Skip to content

Commit

Permalink
fix todo
Browse files Browse the repository at this point in the history
  • Loading branch information
dvelajya committed Dec 3, 2020
1 parent 9d95c1a commit 6f7bed8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
/venv/
/models/
.idea
# TODO: fix it
/tests/data/fasttext.model.trainables.vectors_ngrams_lockf.npy
/tests/data/fasttext.model.wv.vectors_ngrams.npy
5 changes: 2 additions & 3 deletions tests/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@
criterion=criterion,
optimizer=optimizer,
device=device,
n_epoch=10,
n_epoch=5,
verbose=False,
)


class TestTrain(unittest.TestCase):

# TODO: fix it - not always True
def test_val_metrics(self):

val_metrics = validate_loop(
Expand All @@ -72,7 +71,7 @@ def test_val_metrics(self):
)

for metric_name, metric_list in val_metrics.items():
if metric_name.startswith('f1'):
if not metric_name.startswith('loss'):
self.assertTrue(np.mean(metric_list) == 1.0)


Expand Down

0 comments on commit 6f7bed8

Please sign in to comment.