[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_volume_file
  • list_volume_files
  • create_volume_file
  • delete_volume_file
  • upload_volume_file
  • copy_volume_file
  1. API REFERENCE
  2. Python SDK

Volume API

read_volume_file

vessl.read_volume_file(
   volume_id: int, path: str
)

Read a file in the volume.

Args

  • volume_id (int) : Volume ID.

  • path (str) : Path within the volume.

Example

vessl.read_volume_file(
    volume_id=123456,
    path="train.csv",
)

list_volume_files

vessl.list_volume_files(
   volume_id: int, need_download_url: bool = False, path: str = '',
   recursive: bool = False
)

List files in the volume.

Args

  • volume_id (int) : Volume ID.

  • need_download_url (bool) : True if you need a download URL, False otherwise. Defaults to False.

  • path (str) : Path within the volume. Defaults to root.

  • recursive (bool) : True if list files recursively, False otherwise. Defaults to False.

Example

vessl.list_volume_files(
    volume_id=123456,
)

create_volume_file

vessl.create_volume_file(
   volume_id: int, is_dir: bool, path: str
)

Create file in the volume.

Args

  • volume_id (int) : Volume ID.

  • is_dir (bool) : True if a file is directory, False otherwise.

  • path (str) : Path within the volume.

Example

vessl.create_volume_file(
    volume_id=123456,
    is_dir=False,
    path="models"
)

delete_volume_file

vessl.delete_volume_file(
   volume_id: int, path: str
)

Delete file in the volume.

Args

  • volume_id (int) : Volume ID.

  • path (str) : Path within the volume.

Example

vessl.delete_volume_file(
    volume_id=123456,
    path="model.pth",
)

upload_volume_file

vessl.upload_volume_file(
   volume_id: int, path: str
)

Upload file in the volume.

Args

  • volume_id (int) : Volume ID.

  • path (str) : Local file path to upload

Example

vessl.upload_volume_file(
    volume_id=123456,
    path="model.pth",
)

copy_volume_file

vessl.copy_volume_file(
   source_volume_id: Optional[int], source_path: str,
   dest_volume_id: Optional[int], dest_path: str, quiet: bool = False
)

Copy file either from local to remote, remote to local, or remote to remote.

Args

  • source_volume_id (Optional[int]) : Source volume file id. If not specified, source is assumed to be local.

  • source_path (str) : If source_volume_id is empty, local source path. Otherwise, remote source path.

  • dest_volume_id (Optional[int]) : Destination volume file id. If not specified, destination is assumed to be local.

  • dest_path (str) : If dest_volume_id is empty, local destination path. Otherwise, remote destination path.

  • quiet (bool) : True if the muted output, False otherwise. Defaults to False.

Example

vessl.copy_volume_file(
    source_volume_id=123456,
    source_path="model.pth",
    dest_volume_id=123457,
    dest_path="model.pth",
)
PreviousSweep APINextWorkspace API

Last updated 2 years ago