Skip to content

fix fss node not returning T/F and not handling cases with only one f… #1368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

perib
Copy link
Contributor

@perib perib commented Apr 9, 2025

What does this PR do?

FSSNode was not returning True or False for the mutation/crossover operations as required.
Additionally, when only a single feature set was passed in, there would be an error thrown. This was found in issue #1366

Where should the reviewer start?

How should this PR be tested?

subset_1_dict  = { "sense_strands" :  ['a', 'b', 'c']}
fss_1 = FSSNode(subsets=subset_1_dict)

ind1 = fss_1.generate()

for i in range(1000):
    ind1.mutate()

Before this would throw an error like :

File "/scratch2/users/mpb703/conda_environments/tpot_v1/lib/python3.10/site-packages/tpot/search_spaces/nodes/fss_node.py", line 113, in mutate self.selected_subset_name = rng.choice(names) File "numpy/random/_generator.pyx", line 803, in numpy.random._generator.Generator.choice ValueError: a cannot be empty unless no samples are take

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.

1 participant