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

GH-5732: Make TypeEngine.lazy_import_transformers() thread safe #2735

Conversation

Tom-Newton
Copy link
Contributor

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?

How was this patch tested?

Wrote a test

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly. - not applicable
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Copy link

codecov bot commented Sep 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.55%. Comparing base (9f9f197) to head (8a4b484).

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.
📢 Have feedback on the report? Share it here.

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>
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>
Copy link
Member

@pingsutw pingsutw left a 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

Copy link
Collaborator

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@eapolinario eapolinario merged commit ae9c6f8 into flyteorg:master Sep 10, 2024
101 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TypeEngine.lazy_import_transformers() is not thread safe
3 participants