mloptimizer is an optimizing library designed to be used with sklearn interface machine learning algorithms. It uses deap library for genetic algorithm optimization of hyperparameters.
MIT License
5
stars
2
forks
source link
A class named 'FitnessMax' has already been created and it will be overwritten. #21
When two genetic executions are run one after the other, a runtime warning occurs in DEAP:
RuntimeWarning: A class named 'FitnessMax' has already been created and it will be overwritten. Consider deleting the previous creation of that class or rename it.
/home/paradox/.local/lib/python3.10/site-packages/deap/creator.py:185: RuntimeWarning:
Steps to Reproduce
Run a genetic execution using DEAP.
Without restarting the environment, run a second genetic execution.
Observe the runtime warning mentioned above.
Expected Behavior
The second execution should proceed without any warnings or errors related to class creation.
Actual Behavior
A runtime warning is issued indicating that a class named FitnessMax has already been created and will be overwritten.
Possible Solutions
Investigate if the creator module in DEAP is being reset between executions.
Ensure that any created classes are deleted or renamed before re-running the genetic execution.
Consider implementing a check to prevent the recreation of existing classes.
Additional Context
This issue seems to arise due to the reuse of the DEAP creator module without proper cleanup or checks for existing classes.
Description
When two genetic executions are run one after the other, a runtime warning occurs in DEAP:
Steps to Reproduce
Expected Behavior
The second execution should proceed without any warnings or errors related to class creation.
Actual Behavior
A runtime warning is issued indicating that a class named
FitnessMax
has already been created and will be overwritten.Possible Solutions
creator
module in DEAP is being reset between executions.Additional Context
This issue seems to arise due to the reuse of the DEAP
creator
module without proper cleanup or checks for existing classes.