-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add get_test_results #301
Add get_test_results #301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you thank you!!
python/langsmith/client.py
Outdated
execution_time = ( | ||
(r.end_time - r.start_time).total_seconds() if r.end_time else None | ||
) | ||
row["execution_time"] = execution_time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i prefer using .update in places like that so all the updates can be done in one statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me
import pandas as pd # type: ignore | ||
|
||
runs = self.list_runs( | ||
project_id=project_id, project_name=project_name, execution_order=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this paginated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya
python/langsmith/client.py
Outdated
@@ -1165,6 +1165,50 @@ def read_project( | |||
**response.json(), _host_url=self._host_url | |||
) | |||
|
|||
def get_test_results( | |||
self, | |||
project_id: Optional[ID_TYPE] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project_id: Optional[ID_TYPE] = None, | |
*, | |
project_id: Optional[ID_TYPE] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if you like, but i like forcing named invocation for whatever could be a literal since it makes user code more readable (but longer to type), but I like typing more code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more consistent with the rest of the API so ya good point. I've grown tired of typing "project_id" so often
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's an opportunity to not think about anything since and let muscle memory engage for a few seconds
No description provided.