Skip to content

Commit

Permalink
creator reference
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-arenas committed Sep 17, 2024
1 parent 11c6cce commit 87cdbe0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ Release Notes

Some notes on new features in various releases

What's new in 0.11.1
--------------------

^^^^^^^^^^
Bug Fixes:
^^^^^^^^^^

* Fixed a bug that would generate AttributeError: 'GASearchCV' object has no attribute 'creator'


What's new in 0.11.0
--------------------

Expand Down
2 changes: 1 addition & 1 deletion sklearn_genetic/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.11.0"
__version__ = "0.11.1"
8 changes: 4 additions & 4 deletions sklearn_genetic/genetic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def __init__(
self.pre_dispatch = pre_dispatch
self.error_score = error_score
self.return_train_score = return_train_score
self.creator = creator
# self.creator = creator
self.log_config = log_config
self.use_cache = use_cache
self.fitness_cache = {}
Expand Down Expand Up @@ -308,8 +308,8 @@ def _register(self):
"""
self.toolbox = base.Toolbox()

self.creator.create("FitnessMax", base.Fitness, weights=[self.criteria_sign, 1.0])
self.creator.create("Individual", list, fitness=creator.FitnessMax)
creator.create("FitnessMax", base.Fitness, weights=[self.criteria_sign, 1.0])
creator.create("Individual", list, fitness=creator.FitnessMax)


attributes = []
Expand Down Expand Up @@ -939,7 +939,7 @@ def __init__(
self.pre_dispatch = pre_dispatch
self.error_score = error_score
self.return_train_score = return_train_score
self.creator = creator
# self.creator = creator
self.log_config = log_config
self.use_cache = use_cache
self.fitness_cache = {}
Expand Down

0 comments on commit 87cdbe0

Please sign in to comment.