feat(py): suppoer traceable(process_chunk=) #1010
Annotations
2 notices
Benchmark results:
python/langsmith/run_helpers.py#L1
...........
create_5_000_run_trees: Mean +- std dev: 684 ms +- 67 ms
...........
create_10_000_run_trees: Mean +- std dev: 1.38 sec +- 0.10 sec
...........
create_20_000_run_trees: Mean +- std dev: 2.72 sec +- 0.19 sec
...........
dumps_class_nested_py_branch_and_leaf_200x400: Mean +- std dev: 700 us +- 5 us
...........
dumps_class_nested_py_leaf_50x100: Mean +- std dev: 25.9 ms +- 1.1 ms
...........
dumps_class_nested_py_leaf_100x200: Mean +- std dev: 105 ms +- 2 ms
...........
dumps_dataclass_nested_50x100: Mean +- std dev: 26.0 ms +- 0.3 ms
...........
WARNING: the benchmark result may be unstable
* the standard deviation (18.8 ms) is 27% of the mean (70.2 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: 70.2 ms +- 18.8 ms
...........
dumps_pydanticv1_nested_50x100: Mean +- std dev: 198 ms +- 3 ms
|
Comparison against main:
python/langsmith/run_helpers.py#L1
+-----------------------------------------------+----------+------------------------+
| Benchmark | main | changes |
+===============================================+==========+========================+
| dumps_pydanticv1_nested_50x100 | 223 ms | 198 ms: 1.13x faster |
+-----------------------------------------------+----------+------------------------+
| dumps_class_nested_py_branch_and_leaf_200x400 | 703 us | 700 us: 1.00x faster |
+-----------------------------------------------+----------+------------------------+
| create_20_000_run_trees | 2.69 sec | 2.72 sec: 1.01x slower |
+-----------------------------------------------+----------+------------------------+
| create_10_000_run_trees | 1.37 sec | 1.38 sec: 1.01x slower |
+-----------------------------------------------+----------+------------------------+
| create_5_000_run_trees | 677 ms | 684 ms: 1.01x slower |
+-----------------------------------------------+----------+------------------------+
| dumps_class_nested_py_leaf_100x200 | 104 ms | 105 ms: 1.01x slower |
+-----------------------------------------------+----------+------------------------+
| dumps_dataclass_nested_50x100 | 25.6 ms | 26.0 ms: 1.01x slower |
+-----------------------------------------------+----------+------------------------+
| dumps_class_nested_py_leaf_50x100 | 25.1 ms | 25.9 ms: 1.03x slower |
+-----------------------------------------------+----------+------------------------+
| dumps_pydantic_nested_50x100 | 61.4 ms | 70.2 ms: 1.14x slower |
+-----------------------------------------------+----------+------------------------+
| Geometric mean | (ref) | 1.01x slower |
+-----------------------------------------------+----------+------------------------+
|