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

Consider moving all imports to the top of the files #2550

Closed
JoanFM opened this issue Jun 2, 2021 · 4 comments
Closed

Consider moving all imports to the top of the files #2550

JoanFM opened this issue Jun 2, 2021 · 4 comments

Comments

@JoanFM
Copy link
Member

JoanFM commented Jun 2, 2021

As found for this issue #2527 makes me wonder if we should move away from import in inner functions.

As said there, used with threads can lead to deadlocks:

  • If we do the inner imports to avoid cyclic dependencies -> We should refactor the code to avoid them

  • If we do to minimize the import of external dependencies except for specific features (like scipy for sparse) -> Have a global variable to know if dependency exists.

@hanxiao
Copy link
Member

hanxiao commented Jun 2, 2021

reject, as that will revert all the effort we reduce the loading speed #2510

@JoanFM
Copy link
Member Author

JoanFM commented Jun 2, 2021

Then we cannot support Threads and Processes Pods mixed up

@hanxiao
Copy link
Member

hanxiao commented Jun 3, 2021

#2550 (comment)
this is fine to me

@FionnD FionnD closed this as completed Jun 3, 2021
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

No branches or pull requests

3 participants