Skip to content

Commit

Permalink
[Python] increase default client timeout in evals (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos authored Sep 24, 2024
2 parents 727e412 + 62b199d commit da3affd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/langsmith/evaluation/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def evaluate_existing(
... ) # doctest: +ELLIPSIS
View the evaluation results for experiment:...
""" # noqa: E501
client = client or rt.get_cached_client()
client = client or rt.get_cached_client(timeout_ms=(20_000, 90_001))
project = (
experiment
if isinstance(experiment, schemas.TracerSession)
Expand Down
6 changes: 4 additions & 2 deletions python/langsmith/run_trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@


# Note, this is called directly by langchain. Do not remove.
def get_cached_client() -> Client:


def get_cached_client(**init_kwargs: Any) -> Client:
global _CLIENT
if _CLIENT is None:
with _LOCK:
if _CLIENT is None:
_CLIENT = Client()
_CLIENT = Client(**init_kwargs)
return _CLIENT


Expand Down

0 comments on commit da3affd

Please sign in to comment.