@@ -44,8 +44,8 @@ def publish_model(
44
44
The name or id of the model, or a dictionary representation of the model.
45
45
destination : str
46
46
Name of destination to publish the model to.
47
- model_version_id : str or dict, optional
48
- Provide the id, name, or dictionary representation of the version to publish. Defaults to 'latest'.
47
+ model_version : str or dict, optional
48
+ Provide the version id, name, or dict to publish. Defaults to 'latest'.
49
49
name : str, optional
50
50
Provide a custom name for the published model. Defaults to None.
51
51
force : bool, optional
@@ -164,7 +164,7 @@ def create_performance_definition(
164
164
multiple models, input a list of model names, or a list of dictionaries. If no models are specified, all
165
165
models in the project specified will be used. Defaults to None.
166
166
modelVersions: str, list, optional
167
- The name of the model version(s). Defaults to None, where all models are latest.
167
+ The name of the model version(s). Defaults to None, i.e. all models are latest.
168
168
library_name : str
169
169
The library containing the input data, default is 'Public'.
170
170
name : str, optional
@@ -322,7 +322,7 @@ def create_performance_definition(
322
322
@classmethod
323
323
def check_model_versions (cls , models , modelVersions ):
324
324
"""
325
- Checking if the model version(s) are valid. Appending them to the model_id accordingly.
325
+ Checking if the model version(s) are valid and append to model id accordingly.
326
326
327
327
Parameters
328
328
----------
@@ -337,38 +337,38 @@ def check_model_versions(cls, models, modelVersions):
337
337
"""
338
338
if not modelVersions :
339
339
return [model .id for model in models ]
340
- else :
341
- updated_models = []
342
- if not isinstance (modelVersions , list ):
343
- modelVersions = [modelVersions ]
344
340
345
- if len (models ) < len (modelVersions ):
346
- raise ValueError (
347
- "There are too many versions for the amount of models specified."
348
- )
341
+ updated_models = []
342
+ if not isinstance (modelVersions , list ):
343
+ modelVersions = [modelVersions ]
349
344
350
- modelVersions = modelVersions + ["" ] * (len (models ) - len (modelVersions ))
351
- for model , modelVersionName in zip (models , modelVersions ):
345
+ if len (models ) < len (modelVersions ):
346
+ raise ValueError (
347
+ "There are too many versions for the amount of models specified."
348
+ )
352
349
353
- if (
354
- isinstance (modelVersionName , dict )
355
- and "modelVersionName" in modelVersionName
356
- ):
350
+ modelVersions = modelVersions + ["" ] * (len (models ) - len (modelVersions ))
351
+ for model , modelVersionName in zip (models , modelVersions ):
357
352
358
- modelVersionName = modelVersionName ["modelVersionName" ]
359
- elif (
360
- isinstance (modelVersionName , dict )
361
- and "modelVersionName" not in modelVersionName
362
- ):
353
+ if (
354
+ isinstance (modelVersionName , dict )
355
+ and "modelVersionName" in modelVersionName
356
+ ):
363
357
364
- raise ValueError ("Model version is not recognized." )
358
+ modelVersionName = modelVersionName ["modelVersionName" ]
359
+ elif (
360
+ isinstance (modelVersionName , dict )
361
+ and "modelVersionName" not in modelVersionName
362
+ ):
365
363
366
- if modelVersionName != "" :
367
- updated_models .append (model .id + ":" + modelVersionName )
368
- else :
369
- updated_models .append (model .id )
364
+ raise ValueError ("Model version is not recognized." )
365
+
366
+ if modelVersionName != "" :
367
+ updated_models .append (model .id + ":" + modelVersionName )
368
+ else :
369
+ updated_models .append (model .id )
370
370
371
- return updated_models
371
+ return updated_models
372
372
373
373
@classmethod
374
374
def execute_performance_definition (cls , definition ):
0 commit comments