Skip to content

Commit 12304f3

Browse files
committed
feat(evals): Add file syncer attributes to ExtendedEvalsClient
1 parent 9e184d9 commit 12304f3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/humanloop/client.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@ class ExtendedEvalsClient(EvaluationsClient):
4141
"""
4242

4343
client: BaseHumanloop
44+
_file_syncer: FileSyncer
45+
_use_local_files: bool
4446

4547
def __init__(
4648
self,
4749
*,
4850
client_wrapper: SyncClientWrapper,
51+
file_syncer: Optional[FileSyncer] = None,
52+
use_local_files: bool = False
4953
):
5054
super().__init__(client_wrapper=client_wrapper)
55+
self._file_syncer = file_syncer
56+
self._use_local_files = use_local_files
5157

5258
def run(
5359
self,
@@ -161,7 +167,11 @@ def __init__(
161167

162168
# Check if cache_size is non-default but use_local_files is False
163169
self._file_syncer = FileSyncer(client=self, base_dir=local_files_directory, cache_size=cache_size)
164-
eval_client = ExtendedEvalsClient(client_wrapper=self._client_wrapper)
170+
eval_client = ExtendedEvalsClient(
171+
client_wrapper=self._client_wrapper,
172+
file_syncer=self._file_syncer,
173+
use_local_files=self.use_local_files,
174+
)
165175
eval_client.client = self
166176
self.evaluations = eval_client
167177
self.prompts = ExtendedPromptsClient(client_wrapper=self._client_wrapper)

0 commit comments

Comments
 (0)