mirror of
https://github.com/wassname/multifit.git
synced 2026-09-09 11:27:26 +08:00
Make the validate vs train decision based on the existance of cls_last.pth istead of a model directory
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ class ULMFiT:
|
||||
for lang, dataset_path in sorted(get_dataset_path(base_model, dataset_template)):
|
||||
params = CLSHyperParams.from_lm(dataset_path, base_model, lang=lang, name=name, cuda_id=cuda_id)
|
||||
key = str(params.model_dir.relative_to(Path.cwd()))
|
||||
if params.model_dir.exists():
|
||||
if (params.model_dir/"cls_last.pth").exists():
|
||||
print("Evaluating previously trained model")
|
||||
results[key] = params.validate_cls()[1]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user