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

Stuck at 'There are 0 Examples for Label [my_label]' During iPETs Example Selection for Next Generation #104

Open
xruifan opened this issue Aug 7, 2023 · 0 comments

Comments

@xruifan
Copy link

xruifan commented Aug 7, 2023

The program is stuck at "There are 0 examples for label [my_label]" while iPETs are choosing examples per label for the next generation. This is because there is no condition ex.label == label in this line:

examples.extend(ex for ex in original_data if ex.label == label)

causing the while loop len(examples) < examples_per_label[idx] to never break.

A possible solution is to use a conditional check to verify if there are any examples with the given label before attempting to extend the examples to break the loop.

Fan.

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

No branches or pull requests

1 participant