You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using BaseGA from the Genetic Algorithm (GA) library for hyperparameter tuning, it appears that not all available parameters are included in the set_parameters method in the GA.py file. This limitation prevents the utilization of extended parameter sets such as selection, crossover, and mutation.
Including these parameters aligns with functionality provided by similar libraries and improves the usability of the BaseGA optimizer for advanced hyperparameter tuning tasks.
The following error occurs: ValueError: Invalid input parameters: {'crossover', 'pop_size', 'epoch', 'pc', 'pm', 'selection', 'mutation'} for BaseGA optimizer. Valid parameters are: {'pc', 'pm', 'epoch', 'pop_size'}.
In the GA.py file, line 82 currently defines the parameters as: self.set_parameters(["epoch", "pop_size", "pc", "pm"])
This line could be updated to include additional parameters, as shown below: self.set_parameters(["epoch", "pop_size", "pc", "pm", "selection", "crossover", "mutation", "k_way"])
The text was updated successfully, but these errors were encountered:
Sorry for the late reply. It will be fixed in the next updated version.
At the first designation, I thought other parameters should not be the official parameters of GA. That is why I did not add them to the dict variable. I'm considering making GA more flexible by divided it into multiple components like I did with multi-objective GA version (https://github.com/thieu1995/MetaMoo/blob/main/examples/exam_nsga2.py).
But i'm worrying that it will be hard to do the hyper-parameter tuning process.
Or I can just add these parameters to variables set like you request, that will solve the problem. But it will not be flexible as above mthod.
I'm really hesitating between these two options.
Description of the bug
When using BaseGA from the Genetic Algorithm (GA) library for hyperparameter tuning, it appears that not all available parameters are included in the set_parameters method in the GA.py file. This limitation prevents the utilization of extended parameter sets such as selection, crossover, and mutation.
Including these parameters aligns with functionality provided by similar libraries and improves the usability of the BaseGA optimizer for advanced hyperparameter tuning tasks.
Steps To Reproduce
Additional Information
Observed Behavior
The following error occurs:
ValueError: Invalid input parameters: {'crossover', 'pop_size', 'epoch', 'pc', 'pm', 'selection', 'mutation'} for BaseGA optimizer. Valid parameters are: {'pc', 'pm', 'epoch', 'pop_size'}.
In the GA.py file, line 82 currently defines the parameters as:
self.set_parameters(["epoch", "pop_size", "pc", "pm"])
This line could be updated to include additional parameters, as shown below:
self.set_parameters(["epoch", "pop_size", "pc", "pm", "selection", "crossover", "mutation", "k_way"])
The text was updated successfully, but these errors were encountered: