Skip to content
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

[Optimizer] fix shuffle runs on runs less than select size #2223

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

Conversation

techfreaque
Copy link
Contributor

No description provided.

selected_runs = shuffled_runs if select_size is None else shuffled_runs[:select_size]
selected_runs = (shuffled_runs
if (select_size is None or select_size <= len(shuffled_runs))
else shuffled_runs[:select_size])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated shuffle_and_select_runs function introduces a logic error, the if condition selects all runs when select_size is None or less than or equal to the number of runs, which means it ignores the select_size limit in cases where it should apply.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ruidazeng
oh I see, I changed it from <= to >=

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.

2 participants