diff --git a/python/langsmith/evaluation/_runner.py b/python/langsmith/evaluation/_runner.py index 4c5be97b1..a040ea7a3 100644 --- a/python/langsmith/evaluation/_runner.py +++ b/python/langsmith/evaluation/_runner.py @@ -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) diff --git a/python/langsmith/run_trees.py b/python/langsmith/run_trees.py index 233693fdc..f52dda1c1 100644 --- a/python/langsmith/run_trees.py +++ b/python/langsmith/run_trees.py @@ -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