-
Notifications
You must be signed in to change notification settings - Fork 297
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
GH-5732: Make TypeEngine.lazy_import_transformers()
thread safe
#2735
GH-5732: Make TypeEngine.lazy_import_transformers()
thread safe
#2735
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2735 +/- ##
=======================================
Coverage 83.55% 83.55%
=======================================
Files 3 3
Lines 152 152
=======================================
Hits 127 127
Misses 25 25 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.com>
8d0c899
to
8a4b484
Compare
Signed-off-by: Thomas Newton <thomas.w.newton@gmail.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.
Thank you @Tom-Newton
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.
LGTM.
Tracking issue
Closes: flyteorg/flyte#5732
Why are the changes needed?
Lack of thread safety in
TypeEngine.lazy_import_transformers()
can cause errors when triggering Flyte executions simultaneously from concurrent threads.What changes were proposed in this pull request?
cls.has_lazy_import = True
to the end of the function but I decided against it for 2 reasons:How was this patch tested?
Wrote a test
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link