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

How to use IceVision without using from icevision.all import * #1116

Closed
AlexandreBrown opened this issue Jul 4, 2022 · 2 comments · Fixed by #1127
Closed

How to use IceVision without using from icevision.all import * #1116

AlexandreBrown opened this issue Jul 4, 2022 · 2 comments · Fixed by #1127
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@AlexandreBrown
Copy link
Contributor

📓 Documentation Update

What part of documentation was unclear or wrong?
To me, it is unclear which imports are needed in order to use ice vision.
For instance, what is the import that is needed for the various models?

Describe the solution you'd like
I'd like a clear description and examples of how to get started without using a wildcard import (from icevision.all import *).

Additional context
In our case, we cannot use a wildcard import because our code is running as part of a Kubeflow Pipelines.
Long story short, it means our code is being executed inside a function, this function is then deployed to a docker image and executed. There is no such thing as a top level import for us.
This means that we must use imports inside our main function, eg:
Screenshot from 2022-07-04 14-55-47

The following produces an error : SyntaxError: import * only allowed at module level

@AlexandreBrown AlexandreBrown added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Jul 4, 2022
@AlexandreBrown
Copy link
Contributor Author

AlexandreBrown commented Jul 4, 2022

Potential solution for the doc :
Mention that if it is not possible to use wildcard import * , then that you can use import icevision.all as iv.
Then instead of models.mmdet.retinanet, you would do iv.models.mmdet.retinanet

@AlexandreBrown
Copy link
Contributor Author

AlexandreBrown commented Jul 12, 2022

I can confirm that using import icevision.all as iv works as expected, I will make a doc PR next week about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant