File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
examples/language_model/bert/static Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ def reset_program_state_dict(model, state_dict):
192
192
return new_state_dict
193
193
194
194
195
- def create_strategy ():
195
+ def create_strategy (args ):
196
196
"""
197
197
Create build strategy and exec strategy.
198
198
"""
@@ -210,7 +210,7 @@ def dist_optimizer(args, optimizer):
210
210
"""
211
211
Create a distributed optimizer based on a normal optimizer
212
212
"""
213
- build_strategy , exec_strategy = create_strategy ()
213
+ build_strategy , exec_strategy = create_strategy (args )
214
214
215
215
dist_strategy = fleet .DistributedStrategy ()
216
216
dist_strategy .execution_strategy = exec_strategy
@@ -344,8 +344,8 @@ def do_train(args):
344
344
while True :
345
345
files = [
346
346
os .path .join (args .input_dir , f ) for f in os .listdir (args .input_dir )
347
- if os .path .isfile (os .path .join (args .input_dir , f )) and
348
- "training" in f
347
+ if os .path .isfile (os .path .join (args .input_dir , f )) and "training" in
348
+ f
349
349
]
350
350
files .sort ()
351
351
num_files = len (files )
You can’t perform that action at this time.
0 commit comments