Skip to content

Commit

Permalink
Sort labels (NVIDIA#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wolf <[email protected]>
  • Loading branch information
ryantwolf authored Aug 29, 2024
1 parent cb2b705 commit 2e0af57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nemo_curator/classifiers/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def __init__(

self.prob_column = prob_column
self.labels = list(config.label2id.keys())
self.labels.sort(key=lambda x: config.label2id[x])
self.out_dim = len(self.labels)

model = DomainModel(
Expand Down
1 change: 1 addition & 0 deletions nemo_curator/classifiers/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def __init__(

self.prob_column = prob_column
self.labels = list(config.label2id.keys())
self.labels.sort(key=lambda x: config.label2id[x])
self.out_dim = len(self.labels)

model = QualityModel(
Expand Down

0 comments on commit 2e0af57

Please sign in to comment.