@@ -83,6 +83,7 @@ def parse_args():
83
83
"--incremental" ,
84
84
type = bool ,
85
85
default = True ,
86
+ action = argparse .BooleanOptionalAction ,
86
87
help = "Send previous commit to download only the diff" ,
87
88
)
88
89
return parser .parse_args ()
@@ -191,6 +192,7 @@ def run_experiment(client, configfile, code_path, model, incremental):
191
192
version = None
192
193
if incremental :
193
194
version = model .get_version ()
195
+ print ("Incremental Training enabled" )
194
196
195
197
if version is None :
196
198
print ("Creating a new experiment on DeterminedAI..." )
@@ -207,7 +209,7 @@ def run_experiment(client, configfile, code_path, model, incremental):
207
209
208
210
def get_checkpoint (exp ):
209
211
try :
210
- return exp .top_checkpoint ()
212
+ return exp .list_checkpoints ( max_results = 1 )[ 0 ]
211
213
except AssertionError :
212
214
return None
213
215
@@ -216,11 +218,11 @@ def get_checkpoint(exp):
216
218
217
219
218
220
def get_or_create_model (client , model_name , pipeline , repo ):
219
- models = client .get_models (name = model_name )
221
+ models = client .list_models (name = model_name )
220
222
221
223
if len (models ) > 0 :
222
224
print (f"Model already present. Updating it : { model_name } " )
223
- model = client .get_models (name = model_name )[0 ]
225
+ model = client .list_models (name = model_name )[0 ]
224
226
else :
225
227
print (f"Creating a new model : { model_name } " )
226
228
model = client .create_model (
@@ -277,7 +279,6 @@ def main():
277
279
print (
278
280
f"Starting pipeline: name='{ pipeline } ', repo='{ args .repo } ', job_id='{ job_id } '"
279
281
)
280
-
281
282
# --- Download code repository
282
283
283
284
local_repo = os .path .join (os .getcwd (), "code-repository" )
0 commit comments