File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ _fno_benchmark:
1313 --benchmark : true
1414 --use_amp : 1
1515 --use_complex_amp : 0
16- --compile_train : 1
16+ --compile_train : 0
1717 --compile_mode : default
1818
1919pic1d :
Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ def instrument_main(ov, options: Config):
4141
4242 rfstr = ptera .refstring (getDataLoaders )
4343
44+ def get_batch (x ):
45+ return x [0 ].shape [0 ]
4446 #
4547 # Insert milabench tools
4648 #
4749 observer = BenchObserver (
4850 earlystop = options .stop + options .skip ,
49- batch_size_fn = lambda x : x . shape [ 0 ]
51+ batch_size_fn = get_batch
5052 )
5153
5254 probe = ov .probe (f"{ rfstr } () as loader" , overridable = True )
Original file line number Diff line number Diff line change @@ -711,6 +711,12 @@ def executors(self):
711711 if len (self .nodes ) == 1 or max_num == 1 :
712712 return [self .single_node ()]
713713
714+ #
715+ # When using slurm, slurm will launch all those job for us
716+ #
717+ if use_slurm_if_available ():
718+ return [Srun (self .single_node (), self .node_count (), self .task_per_node ())]
719+
714720 for rank , node in enumerate (self .nodes ):
715721 options = dict ()
716722
@@ -731,13 +737,7 @@ def executors(self):
731737 executor = docker_cmd ,
732738 ** options
733739 )
734-
735- #
736- # When using slurm, slurm will launch all those job for us
737- #
738- if use_slurm_if_available ():
739- return [Srun (docker_cmd , self .node_count (), self .task_per_node ())]
740-
740+
741741 executors .append (worker )
742742 return executors
743743
You can’t perform that action at this time.
0 commit comments