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

Avoid importing third party modules on import cofi #89

Closed
jwhhh opened this issue Nov 16, 2022 · 0 comments · Fixed by #94
Closed

Avoid importing third party modules on import cofi #89

jwhhh opened this issue Nov 16, 2022 · 0 comments · Fixed by #94
Assignees
Labels
cofi inference tools New feature or refactoring for links to solvers library WIP Work in progress

Comments

@jwhhh
Copy link
Member

jwhhh commented Nov 16, 2022

To optimise the speed of importing cofi, make the class attributes of solvers that are dynamic (e.g. required_in_problem) delay the module imports.

Use abstract class attributes: https://stackoverflow.com/questions/45248243/most-pythonic-way-to-declare-an-abstract-class-property

@jwhhh jwhhh added the cofi inference tools New feature or refactoring for links to solvers library label Nov 16, 2022
@jwhhh jwhhh self-assigned this Nov 21, 2022
@jwhhh jwhhh added the WIP Work in progress label Nov 21, 2022
@jwhhh jwhhh closed this as completed in #94 Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cofi inference tools New feature or refactoring for links to solvers library WIP Work in progress
Projects
None yet
1 participant