Skip to content

Commit

Permalink
fix showing autolabels on both labeled and unlabeled config
Browse files Browse the repository at this point in the history
  • Loading branch information
bagustris committed May 15, 2024
1 parent 79f90b4 commit 2c7d45e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions data/nemo/exp.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[EXP]
root = /tmp/results/
name = exp_nemo_audmodel_knn
name = exp_nemo_hubert_knn
[DATA]
databases = ['train', 'dev', 'test']
train = ./data/nemo/nemo_train.csv
Expand All @@ -22,7 +22,8 @@ target = emotion
; labels = ['anger', 'neutral', 'sadness', 'happiness']
; get the number of classes from the target column automatically
[FEATS]
type = ['audmodel']
; type = ['audmodel']
type = ['hubert-xlarge-ll60k']
; no_reuse = False
scale = standard
[MODEL]
Expand Down
10 changes: 5 additions & 5 deletions nkululeko/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ def load_datasets(self):
# print keys/column
dbs = ",".join(list(self.datasets.keys()))
labels = self.util.config_val("DATA", "labels", False)
auto_labels = list(
next(iter(self.datasets.values())).df[self.target].unique()
)
if labels:
self.labels = ast.literal_eval(labels)
self.util.debug(f"Target labels (from config): {labels}")
else:
self.labels = list(
next(iter(self.datasets.values())).df[self.target].unique()
)
# show available labels on both labeled and unlabeled config
self.util.debug(f"Target labels (from database): {labels}")
self.labels = auto_labels
self.util.debug(f"Target labels (from database): {auto_labels}")
glob_conf.set_labels(self.labels)
self.util.debug(f"loaded databases {dbs}")

Expand Down

0 comments on commit 2c7d45e

Please sign in to comment.