@@ -38,14 +38,9 @@ def load(self, context, is_fleet=False, main_program=None):
3838 if dirname is None or dirname == "" :
3939 return
4040 print ("going to load " , dirname )
41- if is_fleet :
42- if context ["fleet_mode" ].upper () == "PS" :
43- return
44- # For Pslib
45- context ["fleet" ].load_persistables (context ["exe" ], dirname )
46- else :
47- fluid .io .load_persistables (
48- context ["exe" ], dirname , main_program = main_program )
41+ fluid .io .load_persistables (
42+ context ["exe" ], dirname , main_program = main_program )
43+ print ("load from {} success" .format (dirname ))
4944
5045
5146class SingleStartup (StartupBase ):
@@ -84,7 +79,6 @@ def startup(self, context):
8479 "startup_program" ]
8580 with fluid .program_guard (train_prog , startup_prog ):
8681 context ["exe" ].run (startup_prog )
87- self .load (context , True )
8882 context ["status" ] = "train_pass"
8983
9084
@@ -102,7 +96,7 @@ def startup(self, context):
10296 "startup_program" ]
10397 with fluid .program_guard (train_prog , startup_prog ):
10498 context ["exe" ].run (startup_prog )
105- self .load (context , True )
99+ self .load (context , main_program = train_prog )
106100 context ["status" ] = "train_pass"
107101
108102
0 commit comments