-
Notifications
You must be signed in to change notification settings - Fork 164
feat: add batching to create_examples #2047
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
Conversation
| "aliveStatusCodes": [429, 200], | ||
| "ignorePatterns": [ | ||
| { | ||
| "pattern": "^https://www\\.npmjs\\.com/" |
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.
just to fix ci/cd failure that complains langsmith npm link returns 403, not our fault
| response = client.create_examples(dataset_name="agent-qa", examples=examples) | ||
| # -> {"example_ids": [... | ||
| """ # noqa: E501 | ||
| if not 1 <= max_concurrency <= 3: |
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.
think @validate_call pydantic runtime is ugly, so i prefer this since it works as simple and effective runtime check
LS-4410
Problem: Enhance upload examples performance, devX and reduce chances of hitting the current 25MB max payload limit on our backend.
Solution: size-based batching with conservative concurrency allowed (max concurrency <= 4); use
_estimate_example_sizehelper to estimate size, and depending on the concurrency we trigger sequential upload or multi-threading concurrency upload.Tests: