-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Minimize re-exports from __init__
files
#44
Conversation
This allows importing parts of the package without having to import practically everything (since importing a package will import its parents' __init__s, etc).
Why was it an issue to import sgm as a whole ? |
@benjaminaubin It is very much a problem. This ties into the dependency discussion we had.
If you try to import, say, In short, you can't even import
Whereas on this PR's branch:
|
Thanks ❤️ |
This allows importing parts of the package without having to import practically everything (since importing a package will import its parents' __init__s, etc).
…tability-AI#63) This reverts commit 57862fb.
This allows importing parts of the package without having to import practically everything (since importing a package will import its parents' __init__s, etc).
…tability-AI#63) This reverts commit 57862fb.
Quoting the README:
This allows importing parts of the package without having to import practically everything (since importing a package will import its parents' __init__s, etc).
The one alias I didn't touch is
sgm.modules.GeneralConditioner
since it is currently being referred to using that name in the YAML config files. I suppose the configs could be changed to dosgm.models.encoders.modules.GeneralConditioner
too, but that didn't seem in scope for this.