Skip to content

Commit

Permalink
Add revision identifier to run_on_dataset (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
samnoyes authored Jan 18, 2024
1 parent 8111f9f commit 67f73e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,7 @@ async def arun_on_dataset(
verbose: bool = False,
tags: Optional[List[str]] = None,
input_mapper: Optional[Callable[[Dict], Any]] = None,
revision_id: Optional[str] = None,
) -> Dict[str, Any]:
"""
Asynchronously run the Chain or language model on a dataset
Expand All @@ -2647,6 +2648,8 @@ async def arun_on_dataset(
your model needs to deserialize more complex schema or if your dataset
has inputs with keys that differ from what is expected by your chain
or agent.
revision_id: Optional revision identifier to assign this test run to
track the performance of different versions of your system.
Returns:
A dictionary containing the run's project name and the
Expand Down Expand Up @@ -2748,6 +2751,7 @@ def _evaluate_strings(self, prediction, reference=None, input=None, **kwargs) ->
verbose=verbose,
tags=tags,
input_mapper=input_mapper,
revision_id=revision_id,
)

def run_on_dataset(
Expand All @@ -2762,6 +2766,7 @@ def run_on_dataset(
verbose: bool = False,
tags: Optional[List[str]] = None,
input_mapper: Optional[Callable[[Dict], Any]] = None,
revision_id: Optional[str] = None,
) -> Dict[str, Any]:
"""
Run the Chain or language model on a dataset and store traces
Expand All @@ -2785,6 +2790,8 @@ def run_on_dataset(
your model needs to deserialize more complex schema or if your dataset
has inputs with keys that differ from what is expected by your chain
or agent.
revision_id: Optional revision identifier to assign this test run to
track the performance of different versions of your system.
Returns:
A dictionary containing the run's project name and the resulting model outputs.
Expand Down Expand Up @@ -2886,4 +2893,5 @@ def _evaluate_strings(self, prediction, reference=None, input=None, **kwargs) ->
verbose=verbose,
tags=tags,
input_mapper=input_mapper,
revision_id=revision_id,
)

0 comments on commit 67f73e4

Please sign in to comment.