@@ -229,17 +229,17 @@ def commit_artifact_part(auth, model_version_id, artifact_key, etag):
229
229
return post (auth , path , commit )
230
230
231
231
232
- def download_artifact (auth , model_version_id , artifact ):
232
+ def download_artifact_info (auth , model_version_id , artifact ):
233
233
key = artifact ['key' ]
234
234
url = signed_artifact_url (auth , model_version_id , artifact )
235
- print ("Downloading artifact '%s'" % key )
235
+ print ("Downloading artifact info '%s'" % key )
236
236
curl_cmd = "curl --cacert %s -o %s %s '%s'" % (
237
237
os .environ ['REQUESTS_CA_BUNDLE' ], key , params ['VERTA_CURL_OPTS' ], url )
238
238
os .system (curl_cmd )
239
239
240
240
241
- def download_artifacts (auth , model_version_id , artifacts , model_artifact ):
242
- print ("Downloading %d artifacts" % len (artifacts ))
241
+ def download_artifacts_info (auth , model_version_id , artifacts , model_artifact ):
242
+ print ("Downloading %d artifacts info " % len (artifacts ))
243
243
244
244
downloaded_artifacts = []
245
245
for artifact in artifacts :
@@ -248,7 +248,7 @@ def download_artifacts(auth, model_version_id, artifacts, model_artifact):
248
248
'model_version_id' : model_version_id
249
249
}
250
250
copy_fields (['artifact_type' , 'key' ], artifact , artifact_request )
251
- download_artifact (auth , model_version_id , artifact_request )
251
+ download_artifact_info (auth , model_version_id , artifact_request )
252
252
downloaded_artifacts .append (
253
253
{'key' : artifact ['key' ], 'artifact_type' : artifact ['artifact_type' ]})
254
254
@@ -257,16 +257,16 @@ def download_artifacts(auth, model_version_id, artifacts, model_artifact):
257
257
'model_version_id' : model_version_id
258
258
}
259
259
copy_fields (['artifact_type' , 'key' ], model_artifact , model_artifact_request )
260
- download_artifact (auth , model_version_id , model_artifact_request )
260
+ download_artifact_info (auth , model_version_id , model_artifact_request )
261
261
262
262
return downloaded_artifacts
263
263
264
264
265
- def upload_artifact (auth , model_version_id , artifact ):
265
+ def upload_artifact_info (auth , model_version_id , artifact ):
266
266
key = artifact ['key' ]
267
- print ("Uploading artifact '%s'" % key )
267
+ print ("Uploading artifact info '%s'" % key )
268
268
print (artifact )
269
-
269
+
270
270
artifact_request = {
271
271
'method' : 'PUT' ,
272
272
'model_version_id' : model_version_id ,
@@ -300,12 +300,12 @@ def upload_artifact(auth, model_version_id, artifact):
300
300
return put_url
301
301
302
302
303
- def upload_artifacts (auth , model_version_id , artifacts ):
304
- print ("Uploading %d artifacts" % len (artifacts ))
303
+ def upload_artifacts_info (auth , model_version_id , artifacts ):
304
+ print ("Uploading %d artifacts info " % len (artifacts ))
305
305
uploaded_artifacts = {}
306
306
307
307
for artifact in artifacts :
308
- uploaded_artifacts [artifact ["key" ]] = upload_artifact (auth , model_version_id , artifact )
308
+ uploaded_artifacts [artifact ["key" ]] = upload_artifact_info (auth , model_version_id , artifact )
309
309
return uploaded_artifacts
310
310
311
311
@@ -339,8 +339,8 @@ def get_promotion_data(_config):
339
339
raise SystemExit (1 )
340
340
341
341
model = get_registered_model (source_auth , model_version ['registered_model_id' ])
342
- artifacts = download_artifacts (source_auth , model_version_id , model_version ['artifacts' ],
343
- model_version ['model' ])
342
+ artifacts = download_artifacts_info (source_auth , model_version_id , model_version ['artifacts' ],
343
+ model_version ['model' ])
344
344
345
345
promotion = {
346
346
'build' : build ,
@@ -433,7 +433,7 @@ def create_promotion(_config, promotion):
433
433
434
434
artifacts_and_model = promotion ['artifacts' ]
435
435
artifacts_and_model .append (model_version ['model' ])
436
- artifact_paths = upload_artifacts (dest_auth , model_version ['id' ], artifacts_and_model )
436
+ artifact_paths = upload_artifacts_info (dest_auth , model_version ['id' ], artifacts_and_model )
437
437
438
438
# Standard RMVs will have artifact path 'model' while ER->RMVs will have artifact path 'model.pkl'
439
439
model_artifact = model_version ['model' ]
0 commit comments