Skip to content

Commit

Permalink
Refrain from overwriting experiment metadata (#1250)
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw authored Nov 22, 2024
1 parent 6cf7c9b commit c3053e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions python/langsmith/evaluation/_arunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,12 @@ async def _aend(self) -> None:
project_metadata["dataset_splits"] = await self._get_dataset_splits()
self.client.update_project(
experiment.id,
end_time=datetime.datetime.now(datetime.timezone.utc),
metadata=project_metadata,
end_time=experiment.end_time
or datetime.datetime.now(datetime.timezone.utc),
metadata={
**experiment.metadata,
**project_metadata,
},
)


Expand Down
8 changes: 6 additions & 2 deletions python/langsmith/evaluation/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,8 +1587,12 @@ def _end(self) -> None:
project_metadata["dataset_splits"] = self._get_dataset_splits()
self.client.update_project(
experiment.id,
end_time=datetime.datetime.now(datetime.timezone.utc),
metadata=project_metadata,
end_time=experiment.end_time
or datetime.datetime.now(datetime.timezone.utc),
metadata={
**experiment.metadata,
**project_metadata,
},
)


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.144"
version = "0.1.145"
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 c3053e6

Please sign in to comment.