Skip to content

Commit

Permalink
fastai: Remove ProgressCallback in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Oct 31, 2022
1 parent da4f46c commit b3667f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_fastai.py
Expand Up @@ -4,6 +4,7 @@
from fastai.tabular.all import (
Categorify,
Normalize,
ProgressCallback,
TabularDataLoaders,
accuracy,
tabular_learner,
Expand Down Expand Up @@ -39,6 +40,7 @@ def data_loader():

def test_fastai_callback(tmp_dir, data_loader):
learn = tabular_learner(data_loader, metrics=accuracy)
learn.remove_cb(ProgressCallback)
learn.model_dir = os.path.abspath("./")
learn.fit_one_cycle(2, cbs=[DvcLiveCallback("model")])

Expand All @@ -54,6 +56,7 @@ def test_fastai_callback(tmp_dir, data_loader):

def test_fastai_model_file(tmp_dir, data_loader):
learn = tabular_learner(data_loader, metrics=accuracy)
learn.remove_cb(ProgressCallback)
learn.model_dir = os.path.abspath("./")
learn.fit_one_cycle(2, cbs=[DvcLiveCallback("model")])
assert (tmp_dir / "model.pth").is_file()
Expand Down

0 comments on commit b3667f0

Please sign in to comment.