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

Find a way to not add every solver all at once #98

Open
abelsiqueira opened this issue Jul 5, 2023 · 4 comments
Open

Find a way to not add every solver all at once #98

abelsiqueira opened this issue Jul 5, 2023 · 4 comments
Labels
enhancement New feature or request question Further information is requested user-facing Related to user interface and experience

Comments

@abelsiqueira
Copy link
Member

There are too many dependencies, which slows down the user experience. Perhaps we should use v1.9 selective load? Perhaps require for < v1.9?

@abelsiqueira abelsiqueira added enhancement New feature or request question Further information is requested labels Jul 5, 2023
@tmigot
Copy link
Member

tmigot commented Jul 5, 2023

My issue with this is that you have to know which packages to add beforehand then.

Or more concretly how can solve choose the appropriate solver automatically if the corresponding package is not loaded.

I agree with you that is a limitation and probably the reason why JSOSuite should be use for prototyping.

@abelsiqueira
Copy link
Member Author

I think we can select some sensible defaults that end up covering a large part of solvers. Percival includes JSOSolvers, which is already a big chunk of options. That should handle most non-specific NLP problems.

When you say used for prototyping, what do you mean?

I see a few ways that multi-package interfaces handle this:

  • @load Package solver - MLJ and I think Nonconvex do this
  • using Package which enables a structure to be used explicitly -JuMP and I think Optimization do this
  • using Package indirectly enabling an option somewhere - Don't know if any package does this

Using the Package Extensions (https://pkgdocs.julialang.org/v1.9/creating-packages/#Conditional-loading-of-code-in-packages-(Extensions)) and the backwards-compatible Requires.jl mentioned there, we can try something fast enough for first-time users, and maybe print a warning if the user uses a combination that is not ideal.

@tmigot
Copy link
Member

tmigot commented Jul 31, 2023

Hey @abelsiqueira
I added optional dependencies using Require so we remain compatible with Julia 1.6. It probably misses a bit of documentation but should work.

After, thé first release, we could just bump to 1.9 and use the new features. This way, we still have some options to maintain a 1.6 variant. What do you think?

@abelsiqueira
Copy link
Member Author

We can actually use the PackageExtensions compat (which uses Requires.jl) and keep supporting 1.6 until the next LTS drops. But I am fine implementing this with Requires now and moving to PkgExt later.

@abelsiqueira abelsiqueira added the user-facing Related to user interface and experience label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested user-facing Related to user interface and experience
Projects
None yet
Development

No branches or pull requests

2 participants