Model API

​

read_model_repository

1
vessl.read_model_repository(
2
repository_name: str, **kwargs
3
)
Copied!
Read model repository in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
Example
1
vessl.read_model_repository(
2
repository_name="Transformer-ImageNet",
3
)
Copied!
​

list_model_repositories

1
vessl.list_model_repositories(
2
**kwargs
3
)
Copied!
List model repositories in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Example
1
vessl.list_model_repositories()
Copied!
​

create_model_repository

1
vessl.create_model_repository(
2
name: str, description: str = None, **kwargs
3
)
Copied!
Create model repository in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • name (str) : Model repository name.
  • description (str) : Model repository description. Defaults to None.
Example
1
vessl.create_model_repository(
2
name="Transformer-ImageNet",
3
description="Transformer model trained on ImageNet",
4
)
Copied!
​

update_model_repository

1
vessl.update_model_repository(
2
name: str, description: str, **kwargs
3
)
Copied!
Update model repository in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • name (str) : Model repository name.
  • description (str) : Model repository description to update.
Example
1
vessl.update_model_repository(
2
name="Transformer-ImageNet",
3
description="Update description to this",
4
)
Copied!
​

delete_model_repository

1
vessl.delete_model_repository(
2
name: str, **kwargs
3
)
Copied!
Delete model repository in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • name (str) : Model repository name.
Example
1
vessl.delete_model_repository(
2
name="Transformer-ImageNet",
3
)
Copied!
​

read_model

1
vessl.read_model(
2
repository_name: str, model_number: int, **kwargs
3
)
Copied!
Read model in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
Example
1
vessl.read_model(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
)
Copied!
​

list_models

1
vessl.list_models(
2
repository_name: str, **kwargs
3
)
Copied!
List models in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
Example
1
vessl.list_models(
2
repository_name="Transformer-ImageNet",
3
)
Copied!
​

create_model

1
vessl.create_model(
2
repository_name: str, repository_description: str = None, experiment_id: int = None,
3
model_name: str = None, paths: List[str] = None, **kwargs
4
)
Copied!
Create model in the default organization. If you want to override the default organization, then pass organization_name as **kwargs. If the given model repository name does not exist, then create one with the given repository_description. Otherwise, create a model in the existing model repository.
Args
  • repository_name (str) : Model repository name.
  • repository_description (str) : Model repository description. Defaults to None
  • experiment_id (int) : Pass experiment ID if the model is sourced from the experiment outputs. Defaults to None.
  • model_name (str) : Model name is unique and optional. Defaults to None.
  • paths (List[str]) : Paths for creating model. Paths could be sub paths of experiment output files or local file paths. Defaults to root.
Example
1
vessl.create_model(
2
repository_name="Transformer-ImageNet",
3
repository_description="Transformer model trained on ImageNet",
4
experiment_id=123456,
5
model_name="v0.0.1",
6
)
Copied!
​

update_model

1
vessl.update_model(
2
repository_name: str, model_number: int, name: str, **kwargs
3
)
Copied!
Update model in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
  • name (str) : Model name to update.
Example
1
vessl.update_model(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
name="v0.0.2",
5
)
Copied!
​

delete_model

1
vessl.delete_model(
2
repository_name: str, model_number: int, **kwargs
3
)
Copied!
Delete model in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
Example
1
vessl.delete_model(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
)
Copied!
​

list_model_volume_files

1
vessl.list_model_volume_files(
2
repository_name: str, model_number: int, need_download_url: bool = False,
3
path: str = '', recursive: bool = False, **kwargs
4
)
Copied!
List model files in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
  • need_download_url (bool) : True if you need a download URL, False otherwise. Defaults to False.
  • path (str) : Directory path to list. Defaults to root.
  • recursive (bool) : True if file is a directory, False otherwise. Defaults to False.
Example
1
vessl.list_model_volume_files(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
recursive=True,
5
)
Copied!
​

upload_model_volume_file

1
vessl.upload_model_volume_file(
2
repository_name: str, model_number: int, source_path: str, dest_path: str,
3
**kwargs
4
)
Copied!
Upload file to the model in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
  • source_path (str) : Local source path.
  • dest_path (str) : Destination path within the model.
Example
1
vessl.upload_model_volume_file(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
source_path="model_best.pth",
5
dest_path="model_best.pth",
6
)
Copied!
​

download_model_volume_file

1
vessl.download_model_volume_file(
2
repository_name: str, model_number: int, source_path: str, dest_path: str,
3
**kwargs
4
)
Copied!
Download a model in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
  • source_path (str) : Source path within the model
  • dest_path (str) : Local destination path
Example
1
vessl.download_model_volume_file(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
source_path="model_best.pth",
5
dest_path="models",
6
)
Copied!
​

delete_model_volume_file

1
vessl.delete_model_volume_file(
2
repository_name: str, model_number: int, path: str, recursive: bool = False,
3
**kwargs
4
)
Copied!
Delete the model volume file in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.
Args
  • repository_name (str) : Model repository name.
  • model_number (int) : Model number.
  • path (str) : File path within the model
  • recursive (bool) : True if file is a directory, False otherwise. Defaults to False.
Example
1
vessl.delete_model_volume_file(
2
repository_name="Transformer-ImageNet",
3
model_number=1,
4
source_path="models",
5
recursive=True,
6
)
Copied!