Skip to content

Conversation

@ElFosco
Copy link
Collaborator

@ElFosco ElFosco commented Sep 30, 2025

Adding multi-instance function for both ParameterTuner and GridSearchTuner.
This pull request fixes Issue #751.

@tias
Copy link
Collaborator

tias commented Oct 1, 2025

Hi Marco,

Seems like you are fixing two things in one pull request:

  • Timer fix, great, this could go in easily if in a separate PR

  • Multi-instance tuning, also great, however, its design is not sustainable because it copies code (so double subtle maintenance), the tune_list also silently assumes that 'model' can be a list.

The latter needs to be reworked. A clean solution that could work with any tuner without having to duplicate its code, is to create a new class, something like 'MultiSolver' that mimics being a single solver for all instances. In any tuner, if 'model' is a list, you would not solver = SolverLookup.get(self.solvername, mdl) but you would solver = MultiSolver(self.solvername, models). This multisolver, when .solve(time_limit=...) is called on it, it will create and call a solver for each instance, respecting the global time limit.

This would work for any tuner and would be easy to maintain, do you agree?

@ElFosco
Copy link
Collaborator Author

ElFosco commented Oct 1, 2025

Thank you Tias for the comments. I fully agree, I will work on it later this afternoon.

@ElFosco
Copy link
Collaborator Author

ElFosco commented Oct 2, 2025

Sorry, apparently there is a bug that I just noticed now. I am going to fix it and should be ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants