From f2297089c2ca0c3666f852f9130659f29d439556 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Tue, 30 Jan 2024 11:45:35 -0800 Subject: [PATCH 1/2] Catch exceptions --- python/langsmith/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/langsmith/client.py b/python/langsmith/client.py index 7cff881c4..4b7659d2c 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -784,7 +784,7 @@ def upload_csv( @staticmethod def _run_transform( - run: Union[ls_schemas.Run, dict, ls_schemas.RunLikeDict] + run: Union[ls_schemas.Run, dict, ls_schemas.RunLikeDict], ) -> dict: if hasattr(run, "dict") and callable(getattr(run, "dict")): run_create = run.dict() # type: ignore @@ -3193,6 +3193,10 @@ def _tracing_thread_handle_batch( update = [it.item for it in batch if it.action == "update"] try: client.batch_ingest_runs(create=create, update=update, pre_sampled=True) + except Exception: + # exceptions are logged elsewhere, but we need to make sure the + # background thread continues to run + pass finally: for _ in batch: tracing_queue.task_done() From 82d3ae169793036822a16151644d9229a13b6227 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Tue, 30 Jan 2024 11:47:47 -0800 Subject: [PATCH 2/2] 0.0.85 --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index fcd380a6f..ca913591e 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langsmith" -version = "0.0.84" +version = "0.0.85" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." authors = ["LangChain "] license = "MIT"