Skip to content

Commit

Permalink
fix reproducibility bug
Browse files Browse the repository at this point in the history
  • Loading branch information
perib committed Sep 12, 2024
1 parent 923782a commit bcc890e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tpot2/search_spaces/pipelines/choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, search_spaces : List[SklearnIndividualGenerator], rng=None) -
super().__init__()

self.search_spaces = search_spaces
self.node = np.random.default_rng(rng).choice(self.search_spaces).generate()
self.node = np.random.default_rng(rng).choice(self.search_spaces).generate(rng=rng)


def mutate(self, rng=None):
Expand All @@ -23,7 +23,7 @@ def mutate(self, rng=None):
return self._mutate_node(rng)

def _mutate_select_new_node(self, rng=None):
self.node = random.choice(self.search_spaces).generate()
self.node = random.choice(self.search_spaces).generate(rng=rng)
return True

def _mutate_node(self, rng=None):
Expand Down

0 comments on commit bcc890e

Please sign in to comment.