File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -173,11 +173,19 @@ def classify(self, mode):
173
173
174
174
slurm_script = self .make_model_sbatch_script ()
175
175
176
- self .logger .info (f"Submitting batch job { self .model_sbatch_job_path } " )
177
-
178
176
# TODO: nersc needs `module load esslurm` to sbatch gpu jobs, maybe make
179
177
# this shell command to a file so diff systems can define their own
180
- subprocess .run ([f"python { Path (self .path_to_classifier ) / 'run.py' } --config_path { self .config_path } " ], shell = True )
178
+ file_to_run = 'run.py'
179
+ if self .options .get ("REFACTORED" , False ):
180
+ file_to_run = 'run_refactor.py'
181
+ elif self .options .get ("LEGACY" , False ):
182
+ file_to_run = 'run_legacy.py'
183
+ path = Path (self .path_to_classifier ) / file_to_run
184
+ path = path if path .exists () else Path (self .path_to_classifier ) / 'run.py'
185
+ cmd = f"python { str (path )} --config_path { self .config_path } "
186
+ subprocess .run ([cmd ], shell = True )
187
+ self .logger .info (f"Running command: { cmd } " )
188
+
181
189
return True
182
190
183
191
def predict (self ):
You can’t perform that action at this time.
0 commit comments