[DEV] VESSL Docs
  • Welcome to VESSL Docs!
  • GETTING STARTED
    • Overview
    • Quickstart
    • End-to-end Guides
      • CLI-driven Workflow
      • SDK-driven Workflow
  • USER GUIDE
    • Organization
      • Creating an Organization
      • Organization Settings
        • Add Members
        • Set Notifications
        • Configure Clusters
        • Add Integrations
        • Billing Information
    • Project
      • Creating a Project
      • Project Overview
      • Project Repository & Project Dataset
    • Clusters
      • Cluster Integrations
        • Fully Managed Cloud
        • Personal Laptops
        • On-premise Clusters
        • Private Cloud (AWS)
      • Cluster Monitoring
      • Cluster Administration
        • Resource Specs
        • Access Control
        • Quotas and Limits
        • Remove Cluster
    • Dataset
      • Adding New Datasets
      • Managing Datasets
      • Tips & Limitations
    • Experiment
      • Creating an Experiment
      • Managing Experiments
      • Experiment Results
      • Distributed Experiments
      • Local Experiments
    • Model Registry
      • Creating a Model
      • Managing Models
    • Sweep
      • Creating a Sweep
      • Sweep Results
    • Workspace
      • Creating a Workspace
      • Exploring Workspaces
      • SSH Connection
      • Downloading / Attaching Datasets
      • Running a Server Application
      • Tips & Limitations
      • Building Custom Images
    • Serve
      • Quickstart
      • Serve Web Workflow
        • Monitoring Dashboard
        • Service Logs
        • Service Revisions
        • Service Rollouts
      • Serve YAML Workflow
        • YAML Schema Reference
    • Commons
      • Running Spot Instances
      • Volume Mount
  • API REFERENCE
    • What is the VESSL CLI/SDK?
    • CLI
      • Getting Started
      • vessl run
      • vessl cluster
      • vessl dataset
      • vessl experiment
      • vessl image
      • vessl model
      • vessl organization
      • vessl project
      • vessl serve
      • vessl ssh-key
      • vessl sweep
      • vessl volume
      • vessl workspace
    • Python SDK
      • Integrations
        • Keras
        • TensorBoard
      • Utilities API
        • configure
        • vessl.init
        • vessl.log
          • vessl.Image
          • vessl.Audio
        • vessl.hp.update
        • vessl.progress
        • vessl.upload
        • vessl.finish
      • Dataset API
      • Experiment API
      • Cluster API
      • Image API
      • Model API
        • Model Serving API
      • Organization API
      • Project API
      • Serving API
      • SSH Key API
      • Sweep API
      • Volume API
      • Workspace API
    • Rate Limits
  • TROUBLESHOOTING
    • GitHub Issues
    • VESSL Flare
Powered by GitBook
On this page
  • read_workspace
  • list_workspaces
  • create_workspace
  • list_workspace_logs
  • start_workspace
  • stop_workspace
  • terminate_workspace
  • backup_workspace
  • restore_workspace
  • connect_workspace_ssh
  • update_vscode_remote_ssh
  1. API REFERENCE
  2. Python SDK

Workspace API

read_workspace

vessl.read_workspace(
   workspace_id: int, **kwargs
)

Read workspace in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • workspace_id (int) : Workspace ID.

Example

vessl.read_workspace(
    workspace_id=123456,
)

list_workspaces

vessl.list_workspaces(
   cluster_id: int = None, statuses: List[str] = None, mine: bool = True, **kwargs
)

List workspaces in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • cluster_id (int) : Defaults to None.

  • statuses (List[str]) : A list of status filter. Defaults to None.

  • mine (bool) : True if list only my workspaces, False otherwise. Defaults to True.

Example

vessl.list_workspaces(
    cluster_id=123456,
    statuses=["running"],
)

create_workspace

vessl.create_workspace(
   name: str, cluster_name: str, cluster_node_names: List[str] = None,
   kernel_resource_spec_name: str = None, processor_type: str = None,
   cpu_limit: float = None, memory_limit: str = None, gpu_type: str = None,
   gpu_limit: int = None, kernel_image_url: str = None, max_hours: int = 24,
   dataset_mounts: List[str] = None, local_files: List[str] = None,
   use_vesslignore: bool = True, root_volume_size: str = '100Gi', ports: List[Dict[str,
   Any]] = None, init_script: str = None, **kwargs
)

Create workspace in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • name (str) : Workspace name.

  • cluster_name (str) : Cluster name(must be specified before other options).

  • cluster_node_names (List[str]) : A list of candidate cluster node names. Defaults to None.

  • kernel_resource_spec_name (str) : Resource type to run an experiment (for managed cluster only). Defaults to None.

  • cpu_limit (float) : Number of vCPUs (for custom cluster only). Defaults to None.

  • memory_limit (str) : Memory limit in GiB (for custom cluster only). Defaults to None.

  • gpu_type (str) : GPU type (for custom cluster only). Defaults to None.

  • gpu_limit (int) : Number of GPU cores (for custom cluster only). Defaults to None.

  • kernel_image_url (str) : Kernel docker image URL. Defaults to None.

  • max_hours (int) : Max hours limit to run. Defaults to 24.

  • dataset_mounts (List[str]) : A list of dataset mounts. Defaults to None.

  • local_files (List[str]) : A list of local file mounts. Defaults to None.

  • use_vesslignore (bool) : True if local files matching glob patterns in .vesslignore files should be ignored. Patterns apply relative to the directory containing that .vesslignore file.

  • root_volume_size (str) : Root volume size. Defaults to "100Gi".

  • ports (List[Dict[str, Any]]) : Port numbers to expose. Defaults to None. processor_type(str) cpu or gpu (for custom cluster only). Defaults to None. init_script(str) Custom init script. Defaults to None.

Example

vessl.create_workspace(
    name="modern-kick",
    cluster_name="aws-apne2",
    kernel_resource_spec_name="v1.cpu-0.mem-1",
    kernel_image_url="public.ecr.aws/vessl/kernels:py36.full-cpu.jupyter",
)

list_workspace_logs

vessl.list_workspace_logs(
   workspace_id: int, tail: int = 200, **kwargs
)

List experiment logs in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • workspace_id (int) : Workspace ID.

  • tail (int) : The number of lines to display from the end. Display all if -1. Defaults to 200.

Example

 vessl.list_workspace_logs(
    workspace_id=123456,
 )

start_workspace

vessl.start_workspace(
   workspace_id: int, **kwargs
)

Start the workspace container in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • workspace_id (int) : Workspace ID.

Example

vessl.start_workspace(
    workspace_id=123456,
)

stop_workspace

vessl.stop_workspace(
   workspace_id: int, **kwargs
)

Stop the workspace container in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • workspace_id (int) : Workspace ID.

Example

vessl.stop_workspace(
    workspace_id=123456,
)

terminate_workspace

vessl.terminate_workspace(
   workspace_id: int, **kwargs
)

Terminate the workspace container in the default organization. If you want to override the default organization, then pass organization_name as **kwargs.

Args

  • workspace_id (int) : Workspace ID.

Example

vessl.terminate_workspace(
    workspace_id=123456,
)

backup_workspace

vessl.backup_workspace()

Backup the home directory of the workspace. This command should be called inside a workspace.

Example

vessl.backup_workspace()

restore_workspace

vessl.restore_workspace()

Restore the home directory from the previous backup. This command should be called inside a workspace.

Example

vessl.restore_workspace()

connect_workspace_ssh

vessl.connect_workspace_ssh(
   private_key_path: str
)

Connect to a running workspace via SSH.

Args

  • private_key_path (str) : SSH private key path

Example

vessl.connect_workspace_ssh(
    private_key_path="~/.ssh/key_path",
)

update_vscode_remote_ssh

vessl.update_vscode_remote_ssh(
   private_key_path: str
)

Update .ssh/config file for VSCode Remote-SSH plugin.

Args

  • private_key_path (str) : SSH private key path

Example

vessl.update_vscode_remote_ssh(
    private_key_path="~/.ssh/key_path",
)
PreviousVolume APINextRate Limits

Last updated 1 year ago