Skip to content

Fix max_value calculation in permutation_symmetries strategy#688

Closed
Copilot wants to merge 2 commits intofeature/invariance_augmentationfrom
copilot/sub-pr-626
Closed

Fix max_value calculation in permutation_symmetries strategy#688
Copilot wants to merge 2 commits intofeature/invariance_augmentationfrom
copilot/sub-pr-626

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 4, 2025

Addresses feedback from #626 (comment)

The max_value parameter in the permutation_symmetries hypothesis strategy had a copy-paste error: len(parameter_names_pool) // len(parameter_names_pool) always evaluates to 1.

Changes

  • Fixed calculation to len(parameter_names_pool) // n_params - 1 in tests/hypothesis_strategies/symmetries.py:55

This correctly computes the maximum number of copermuted groups that can fit in the parameter pool without exceeding available parameters.

# Before: always 1
max_value=len(parameter_names_pool) // len(parameter_names_pool)

# After: actual max groups possible
max_value=len(parameter_names_pool) // n_params - 1

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI mentioned this pull request Nov 4, 2025
2 tasks
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: Scienfitz <17951239+Scienfitz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix calculation for max_value in symmetry and data augmentation Fix max_value calculation in permutation_symmetries strategy Nov 4, 2025
Copilot AI requested a review from Scienfitz November 4, 2025 12:10
@Scienfitz Scienfitz closed this Nov 4, 2025
@Scienfitz Scienfitz deleted the copilot/sub-pr-626 branch November 4, 2025 13:09
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.

3 participants