Skip to content

Commit

Permalink
[Python] Catch on each write endpoint (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw authored Aug 22, 2024
1 parent f792a58 commit 15b7ea6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,8 +1381,8 @@ def batch_ingest_runs(
self._post_batch_ingest_runs(orjson.dumps(body_chunks))

def _post_batch_ingest_runs(self, body: bytes):
try:
for api_url, api_key in self._write_api_urls.items():
for api_url, api_key in self._write_api_urls.items():
try:
self.request_with_retries(
"POST",
f"{api_url}/runs/batch",
Expand All @@ -1396,8 +1396,8 @@ def _post_batch_ingest_runs(self, body: bytes):
to_ignore=(ls_utils.LangSmithConflictError,),
stop_after_attempt=3,
)
except Exception as e:
logger.warning(f"Failed to batch ingest runs: {repr(e)}")
except Exception as e:
logger.warning(f"Failed to batch ingest runs: {repr(e)}")

def update_run(
self,
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langsmith"
version = "0.1.101"
version = "0.1.102"
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
authors = ["LangChain <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 15b7ea6

Please sign in to comment.