Skip to content
Snippets Groups Projects
Commit 95b71422 authored by lukas leufen's avatar lukas leufen
Browse files

test for save model was still erroneous

parent bc989d62
No related branches found
No related tags found
3 merge requests!125Release v0.10.0,!124Update Master to new version v0.10.0,!101Resolve "model folder in experiment"
Pipeline #39302 passed
......@@ -205,14 +205,14 @@ class TestTraining:
assert ready_to_train.model.history.epoch == [0, 1]
assert len(glob.glob(os.path.join(path, "plots", "TestExperiment_history_*.pdf"))) == 2
def test_save_model(self, init_without_run, path, caplog):
def test_save_model(self, init_without_run, model_path, caplog):
caplog.set_level(logging.DEBUG)
model_name = "test_model.h5"
assert model_name not in os.listdir(path)
assert model_name not in os.listdir(model_path)
init_without_run.save_model()
message = PyTestRegex(f"save best model to {os.path.join(path, model_name)}")
message = PyTestRegex(f"save best model to {os.path.join(model_path, model_name)}")
assert caplog.record_tuples[1] == ("root", 10, message)
assert model_name in os.listdir(path)
assert model_name in os.listdir(model_path)
def test_load_best_model_no_weights(self, init_without_run, caplog):
caplog.set_level(logging.DEBUG)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment