Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Empty logger made anytime MatPipe imported #141

Closed
ardunn opened this issue Dec 6, 2018 · 4 comments
Closed

Empty logger made anytime MatPipe imported #141

ardunn opened this issue Dec 6, 2018 · 4 comments
Assignees

Comments

@ardunn
Copy link
Contributor

ardunn commented Dec 6, 2018

No description provided.

@ardunn ardunn assigned utf and ardunn Dec 6, 2018
@ardunn ardunn added the ugrads label Dec 11, 2018
@ardunn
Copy link
Contributor Author

ardunn commented Dec 11, 2018

This can be fixed by looking at the LoggableMixin object and trying to figure out why it creates an empty logger.

@ADA110 ADA110 self-assigned this Dec 17, 2018
@ADA110
Copy link
Contributor

ADA110 commented Dec 24, 2018

I think the issue comes from the fact that imports in Python are specifically executed, which can cause other imports to be executed.
https://www.benkuhn.net/importtime

The init.py and the line "from automatminer.configs import default_configs" in pipeline.py is the source of the problem

@ardunn
Copy link
Contributor Author

ardunn commented Dec 24, 2018

got it, didn't even realize that was outside of an `if name=="main" block. im trying to think of some ways we can still import these configs without having these unnecessary .logs and also without making it overly complicated. perhaps we can just convert them to functions (which return the dicts shown), or possibly 1 function that takes in a string and returns a config dict? Or if you have another idea I'm all ears

@ardunn
Copy link
Contributor Author

ardunn commented Dec 27, 2018

closed via 9e809c8

@ardunn ardunn closed this as completed Dec 27, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants