Model
read_model_repository
vessl.read_model_repository(
repository_name: str, **kwargs
)
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
vessl.read_model_repository(
repository_name="Transformer-ImageNet",
)
list_model_repositories
vessl.list_model_repositories(
**kwargs
)
List model repositories in the default organization. If you want to
override the default organization, then pass organization_name
as
**kwargs
.
Example
vessl.list_model_repositories()
create_model_repository
vessl.create_model_repository(
name: str, description: str = None, **kwargs
)
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
vessl.create_model_repository(
name="Transformer-ImageNet",
description="Transformer model trained on ImageNet",
)
update_model_repository
vessl.update_model_repository(
name: str, description: str, **kwargs
)
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
vessl.update_model_repository(
name="Transformer-ImageNet",
description="Update description to this",
)
delete_model_repository
vessl.delete_model_repository(
name: str, **kwargs
)
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
vessl.delete_model_repository(
name="Transformer-ImageNet",
)
read_model
vessl.read_model(
repository_name: str, model_number: int, **kwargs
)
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
vessl.read_model(
repository_name="Transformer-ImageNet",
model_number=1,
)
list_models
vessl.list_models(
repository_name: str, **kwargs
)
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
vessl.list_models(
repository_name="Transformer-ImageNet",
)
create_model
vessl.create_model(
repository_name: str, repository_description: str = None, experiment_id: int = None,
model_name: str = None, paths: List[str] = None, **kwargs
)
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 Noneexperiment_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
vessl.create_model(
repository_name="Transformer-ImageNet",
repository_description="Transformer model trained on ImageNet",
experiment_id=123456,
model_name="v0.0.1",
)
update_model
vessl.update_model(
repository_name: str, model_number: int, name: str, **kwargs
)
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
vessl.update_model(
repository_name="Transformer-ImageNet",
model_number=1,
name="v0.0.2",
)
delete_model
vessl.delete_model(
repository_name: str, model_number: int, **kwargs
)
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
vessl.delete_model(
repository_name="Transformer-ImageNet",
model_number=1,
)
list_model_volume_files
vessl.list_model_volume_files(
repository_name: str, model_number: int, need_download_url: bool = False,
path: str = '', recursive: bool = False, **kwargs
)
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
vessl.list_model_volume_files(
repository_name="Transformer-ImageNet",
model_number=1,
recursive=True,
)
upload_model_volume_file
vessl.upload_model_volume_file(
repository_name: str, model_number: int, source_path: str, dest_path: str,
**kwargs
)
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
vessl.upload_model_volume_file(
repository_name="Transformer-ImageNet",
model_number=1,
source_path="model_best.pth",
dest_path="model_best.pth",
)
download_model_volume_file
vessl.download_model_volume_file(
repository_name: str, model_number: int, source_path: str, dest_path: str,
**kwargs
)
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 modeldest_path
(str) : Local destination path
Example
vessl.download_model_volume_file(
repository_name="Transformer-ImageNet",
model_number=1,
source_path="model_best.pth",
dest_path="models",
)
delete_model_volume_file
vessl.delete_model_volume_file(
repository_name: str, model_number: int, path: str, **kwargs
)
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
Example
vessl.delete_model_volume_file(
repository_name="Transformer-ImageNet",
model_number=1,
source_path="models",
recursive=True,
)