@@ -23,7 +23,6 @@ class SILExperiment:
2323 mixed_precision : bool = True
2424 num_devices : int = 1
2525 clearml_queue : Optional [str ] = None
26- save_checkpoints : bool = False
2726 run_prep : bool = False
2827 run_train : bool = False
2928 run_test : bool = False
@@ -40,7 +39,6 @@ def __post_init__(self):
4039 self .name ,
4140 self .clearml_queue ,
4241 commit = self .commit ,
43- use_default_model_dir = self .save_checkpoints ,
4442 tag = self .clearml_tag ,
4543 )
4644 self .name : str = self .clearml .name
@@ -89,7 +87,6 @@ def test(self):
8987 scorers = self .scorers ,
9088 produce_multiple_translations = self .produce_multiple_translations ,
9189 save_confidences = self .save_confidences ,
92- use_default_model_dir = self .save_checkpoints ,
9390 )
9491
9592 def translate (self ):
@@ -104,7 +101,6 @@ def translate(self):
104101 translator = TranslationTask (
105102 name = self .name ,
106103 checkpoint = checkpoint ,
107- use_default_model_dir = self .save_checkpoints ,
108104 commit = self .commit ,
109105 )
110106
@@ -253,9 +249,6 @@ def main() -> None:
253249 args .train = True
254250 args .test = True
255251
256- if not args .train :
257- args .save_checkpoints = True
258-
259252 exp = SILExperiment (
260253 name = args .experiment ,
261254 make_stats = args .stats ,
@@ -265,7 +258,6 @@ def main() -> None:
265258 clearml_queue = args .clearml_queue ,
266259 clearml_tag = args .clearml_tag ,
267260 commit = args .commit ,
268- save_checkpoints = args .save_checkpoints ,
269261 run_prep = args .preprocess ,
270262 run_train = args .train ,
271263 run_test = args .test ,
@@ -275,6 +267,9 @@ def main() -> None:
275267 scorers = set (s .lower () for s in args .scorers ),
276268 score_by_book = args .score_by_book ,
277269 )
270+
271+ if not args .save_checkpoints :
272+ SIL_NLP_ENV .delete_path_on_exit (get_mt_exp_dir (args .experiment ) / "run" )
278273 exp .run ()
279274
280275
0 commit comments