-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[core] Lazy import of pydantics #41475
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
Signed-off-by: rickyyx <[email protected]>
|
https://buildkite.com/ray-project/release/builds/2492#018c1923-c5d0-4e09-a67e-b45cf2c3b553 release test perf back to 530 level. |
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.
Q: consider adding a unit test to avoid regression? (i.e., import serialization_addon.py and make sure libs are not imported
Sure - but i think what's more important is how we prevent this from happening again. Don't we have tests that track worker start-up time? |
Signed-off-by: rickyyx <[email protected]>
|
|
||
| assert "ray" in sys.modules | ||
| for x in blocked_deps: | ||
| assert x not in sys.modules |
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.
test it failed the test on master.
Why are these changes needed?
Closes #41338
The hypothesis is that we are importing some additional things when initializing the python workers, and changing the import to lazy seems to fix the issue.
See https://buildkite.com/ray-project/release/builds/2492#018c1923-c5d0-4e09-a67e-b45cf2c3b553
Master: tasks_per_seconds = 430
This PR: tasks_per_seconds = 530
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.