Skip to content

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

@xruifan

Description

@xruifan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions