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

[Feature] Don't install cfgs module as a top level Python import #63

Open
samuela opened this issue Jan 9, 2023 · 4 comments
Open

[Feature] Don't install cfgs module as a top level Python import #63

samuela opened this issue Jan 9, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@samuela
Copy link

samuela commented Jan 9, 2023

Feature

In the process of packaging nocturne for Nixpkgs (NixOS/nixpkgs#208847 (comment)), it was discovered that nocturne doesn't just install "nocturne" as a top-level package -- eg import nocturne -- but also "cfgs". In fact, having cfgs available on the top-level is required in order to import nocturne:

from cfgs.config import PROCESSED_TRAIN_NO_TL, PROCESSED_VALID_NO_TL, PROJECT_PATH

Is this intentional? Polluting the top-level scope with "cfgs" seems undesirable. Would it be possible to move cfgs out of the top-level package namespace?

@eugenevinitsky
Copy link
Collaborator

Thanks for flagging this! @xiaomengy @nathanlct do you see any reason this needs to be a top level folder? I don't.

@nathanlct
Copy link
Contributor

That folder seems to be mostly Hydra configs associated with the examples/ folder (and the paths are still eugenevinitsky/), that's probably why it's a top folder. But why are those paths PROCESSED_TRAIN_NO_TL hardcoded in and imported from config.py, and not loaded from config.yml?

@eugenevinitsky
Copy link
Collaborator

@samuela we'll submit a PR moving this out, do you have a timeline you need this on?

@samuela
Copy link
Author

samuela commented Jan 11, 2023

Thanks @eugenevinitsky! No rush on my end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants