From 1f1af64618030a4db4c7a527a46a8ef4a9ecc83a Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Tue, 9 Apr 2024 23:32:13 -0700 Subject: [PATCH] unnec --- python/langsmith/_testing.py | 2 +- python/langsmith/client.py | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/python/langsmith/_testing.py b/python/langsmith/_testing.py index a164fdc53..69c779d94 100644 --- a/python/langsmith/_testing.py +++ b/python/langsmith/_testing.py @@ -117,7 +117,7 @@ def unit(*args: Any, **kwargs: Any) -> Callable: >>> os.environ["LANGCHAIN_TEST_CACHE"] = "tests/cassettes" >>> import openai >>> from langsmith.wrappers import wrap_openai - >>> @unit() + >>> @unit ... def test_openai_says_hello(): ... # Traced code will be included in the test case ... oai_client = wrap_openai(openai.Client()) diff --git a/python/langsmith/client.py b/python/langsmith/client.py index f3dfc1626..e5e967654 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -813,7 +813,9 @@ def _get_paginated_list( while True: params_["offset"] = offset response = self.request_with_retries( - "GET", path, params=params_, stop_after_attempt=1 + "GET", + path, + params=params_, ) items = response.json() @@ -2330,7 +2332,6 @@ def read_dataset( response = self.request_with_retries( "GET", path, - stop_after_attempt=3, params=params, ) result = response.json() @@ -2452,7 +2453,6 @@ def read_dataset_openai_finetuning( response = self.request_with_retries( "GET", f"{path}/{_as_uuid(dataset_id, 'dataset_id')}/openai_ft", - stop_after_attempt=3, ) dataset = [json.loads(line) for line in response.text.strip().split("\n")] return dataset @@ -2659,7 +2659,6 @@ def read_dataset_version( response = self.request_with_retries( "GET", f"/datasets/{_as_uuid(dataset_id, 'dataset_id')}/version", - stop_after_attempt=3, params={"as_of": as_of, "tag": tag}, ) return ls_schemas.DatasetVersion(**response.json()) @@ -3017,7 +3016,6 @@ def read_example( response = self.request_with_retries( "GET", f"/examples/{_as_uuid(example_id, 'example_id')}", - stop_after_attempt=3, params={ "as_of": as_of.isoformat() if as_of else None, }, @@ -3535,7 +3533,6 @@ def read_feedback(self, feedback_id: ID_TYPE) -> ls_schemas.Feedback: response = self.request_with_retries( "GET", f"/feedback/{_as_uuid(feedback_id, 'feedback_id')}", - stop_after_attempt=3, ) return ls_schemas.Feedback(**response.json())