Skip to content
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

fix(py): Tag pytest experiments #1481

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/langsmith/testing/_internal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

Check notice on line 1 in python/langsmith/testing/_internal.py

View workflow job for this annotation

GitHub Actions / benchmark

Benchmark results

........... create_5_000_run_trees: Mean +- std dev: 663 ms +- 60 ms ........... create_10_000_run_trees: Mean +- std dev: 1.34 sec +- 0.10 sec ........... create_20_000_run_trees: Mean +- std dev: 2.60 sec +- 0.22 sec ........... dumps_class_nested_py_branch_and_leaf_200x400: Mean +- std dev: 711 us +- 10 us ........... dumps_class_nested_py_leaf_50x100: Mean +- std dev: 24.9 ms +- 0.6 ms ........... dumps_class_nested_py_leaf_100x200: Mean +- std dev: 105 ms +- 2 ms ........... dumps_dataclass_nested_50x100: Mean +- std dev: 25.3 ms +- 0.3 ms ........... WARNING: the benchmark result may be unstable * the standard deviation (16.1 ms) is 22% of the mean (72.4 ms) Try to rerun the benchmark with more runs, values and/or loops. Run 'python -m pyperf system tune' command to reduce the system jitter. Use pyperf stats, pyperf dump and pyperf hist to analyze results. Use --quiet option to hide these warnings. dumps_pydantic_nested_50x100: Mean +- std dev: 72.4 ms +- 16.1 ms ........... dumps_pydanticv1_nested_50x100: Mean +- std dev: 196 ms +- 5 ms

Check notice on line 1 in python/langsmith/testing/_internal.py

View workflow job for this annotation

GitHub Actions / benchmark

Comparison against main

+-----------------------------------------------+----------+------------------------+ | Benchmark | main | changes | +===============================================+==========+========================+ | dumps_pydanticv1_nested_50x100 | 220 ms | 196 ms: 1.12x faster | +-----------------------------------------------+----------+------------------------+ | create_20_000_run_trees | 2.70 sec | 2.60 sec: 1.04x faster | +-----------------------------------------------+----------+------------------------+ | create_5_000_run_trees | 684 ms | 663 ms: 1.03x faster | +-----------------------------------------------+----------+------------------------+ | dumps_class_nested_py_leaf_50x100 | 25.0 ms | 24.9 ms: 1.01x faster | +-----------------------------------------------+----------+------------------------+ | dumps_class_nested_py_branch_and_leaf_200x400 | 709 us | 711 us: 1.00x slower | +-----------------------------------------------+----------+------------------------+ | dumps_dataclass_nested_50x100 | 25.2 ms | 25.3 ms: 1.00x slower | +-----------------------------------------------+----------+------------------------+ | dumps_class_nested_py_leaf_100x200 | 104 ms | 105 ms: 1.01x slower | +-----------------------------------------------+----------+------------------------+ | create_10_000_run_trees | 1.33 sec | 1.34 sec: 1.01x slower | +-----------------------------------------------+----------+------------------------+ | dumps_pydantic_nested_50x100 | 67.0 ms | 72.4 ms: 1.08x slower | +-----------------------------------------------+----------+------------------------+ | Geometric mean | (ref) | 1.01x faster | +-----------------------------------------------+----------+------------------------+

import atexit
import contextlib
Expand Down Expand Up @@ -422,7 +422,8 @@
metadata={
"revision_id": ls_env.get_langchain_env_var_metadata().get(
"revision_id"
)
),
"__ls_runner": "pytest",
},
)
except ls_utils.LangSmithConflictError:
Expand Down Expand Up @@ -457,6 +458,7 @@
**git_info,
"dataset_version": dataset_version,
"revision_id": ls_env.get_langchain_env_var_metadata().get("revision_id"),
"__ls_runner": "pytest",
},
)
if dataset_version and git_info["commit"] is not None:
Expand Down