-
Notifications
You must be signed in to change notification settings - Fork 42
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix slow Sage imports #76
Conversation
By replacing all Sage imports with an individual imoprt, the loading time for `from estimator import *` reduces from 3.5s to 1.4s.
Fix duplicate import
I guess we would need the CI to pass before we used an alternative technique for importing (see here: https://github.com/malb/lattice-estimator/pull/76/checks). It seems to be unhappy with the way |
The PEP8 fails because of Regarding the infinity import problem, I have no idea why. It works for me locally: sage -python -c "from sage.rings.infinity import infinity as oo" |
Perhaps the CI uses a different Sage version? Those deep imports are not supported by Sage, ie it gives no guarantee those will work. |
The most recent log prints this at the very start:
which seems weird. Also, CI seems to specify that Sage is installed via |
Indeed, this is installing |
This is very weird, I tried using a fresh Sage 9.0 (conda) installation and there's no issue with importing. Not sure then... I also noticed that at the start of the log, it prints an error where I will close this issue but if I figure out why this is happening I will report back |
FWIW, removing the |
By replacing all Sage imports with an individual imoprt, the loading time for
from estimator import *
reduces from 3.5s to 1.4s. Doctests seem to work (except for timeout stuffs) so I assume I didn't break anything 馃槃