[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
  • 1. Sign up and create a Project
  • 2. Install VESSL AI Client
  • 3. Run an Experiment
  • 4. Track and visualize experiments
  • 5. Develop state-of-the-art models on VESSL AI
  • Next Step
  1. GETTING STARTED

Quickstart

Run your first experiment on VESSL

PreviousOverviewNextEnd-to-end Guides

Last updated 3 years ago

1. Sign up and create a Project

To run your first experiment on VESSL AI, first for a free account and add an organization. Organization is a shared working environment where you can find team assets such as datasets, models, and experiments.

While we are on the web console, let’s also add a project called "mnist". As you will see later, Project serves as a central repository equipped with a dashboard and visualizations for all of your experiments.

2. Install VESSL AI Client

VESSL AI comes with a powerful CLI and Python SDK useful for managing ML assets and workflow. Install VESSL AI Client on your local machine using pip install.

pip install vessl
git clone https://github.com/vessl-ai/examples
cd examples
vessl configure \
  --organization quickstart \
  --project mnist

3. Run an Experiment

# Install requirements and run VESSL experiments from local machine
pip install -r mnist/keras/requirements.txt && python mnist/keras/main.py --output-path=output --checkpoint-path=output/checkpoint --save-model --save-image
vessl run "pip install -r mnist/keras/requirements.txt && python mnist/keras/main.py --save-model --save-image"
$ vessl experiment create --upload-local-file .:/root/local

[?] Cluster: aws-apne2-prod1
 > aws-apne2-prod1

[?] Resource: v1.cpu-0.mem-1
 > v1.cpu-0.mem-1
   v1.cpu-2.mem-6
   v1.cpu-2.mem-6.spot
   v1.cpu-4.mem-13
   v1.cpu-4.mem-13.spot

[?] Image URL: public.ecr.aws/vessl/kernels:py36.full-cpu
 > public.ecr.aws/vessl/kernels:py36.full-cpu
   public.ecr.aws/vessl/kernels:py37.full-cpu
   public.ecr.aws/vessl/kernels:py36.full-cpu.jupyter
   public.ecr.aws/vessl/kernels:py37.full-cpu.jupyter
   tensorflow/tensorflow:1.14.0-py3
   tensorflow/tensorflow:1.15.5-py3
   tensorflow/tensorflow:2.0.4-py3
   tensorflow/tensorflow:2.2.1-py3
   
[?] Command: cd local && pip install -r mnist/keras/requirements.txt && python mnist/keras/main.py --save-model --save-image

You should specify --upload-local-file option to upload your current directory. If you want to link a github repo instead of upload files from local, see this.

vessl experiment create \
  --cluster aws-apne2-prod1 \
  --resource v1.cpu-0.mem-1 \
  --image-url public.ecr.aws/vessl/kernels:py36.full-cpu \
  --upload-local-file .:/root/local
  --command 'cd local && pip install -r mnist/keras/requirements.txt && python mnist/keras/main.py --save-model --save-image'

You should specify --upload-local-file option to upload your current directory. If you want to link a github repo instead of upload files from local, see this.

Once the command completes, you will be given a link to Experiments. The experiment page stores logs, visualizations, and files specific to the experiment.

import vessl

# Initialize new experiment via VESSL SDK 
vessl.init(organization="quickstart", project="mnist")
# Train function and log metrics to VESSL

def train(model, device, train_loader, optimizer, epoch, start_epoch):
    model.train()
    loss = 0
    for batch_idx, (data, label) in enumerate(train_loader):
        ...

    # Logging loss metrics to VESSL
    vessl.log(
        step=epoch + start_epoch + 1,
        payload={'loss': loss.item()}
    )

4. Track and visualize experiments

When you click the project name on the navigation bar, you will be guided back to the project page. Under each tab, you can explore VESSL's main features:

  • Experiments – unified dashboard for tracking experiments

  • Tracking – visualization of model performance and system metrics

  • Sweeps – scalable hyperparameter optimization

  • Models – a repository for versioned models

5. Develop state-of-the-art models on VESSL AI

Let's try building a model with the resources and datasets of your choice. Under Datasets, you can mount and manage datasets from local or cloud storage.

Let's move over to Workspaces where you can configure a custom environment for Jupyter Notebooks with SSH. You can use either VESSL AI's managed cluster with spot instance support or your own custom clusters.

Launch a Juypter Notebook. Here, you will find an example Notebook which introduces how you can integrate local experiments with VESSL AI to empower your research workflow.

Next Step

Now that you are familiar with the overall workflow of VESSL AI, explore additional features available on our platform and start building!

In this guide, we will be using an from our GitHub. Git clone the repository.

Let's access the project we created using your first VESSL AI CLI command. The command will guide you to a page that grants CLI access and your default organization and project.

Now that we have specified the project and obtained CLI access, you will run your first on VESSL AI. On a local machine, this is as simple as running a python script.

You can also run experiments using VESSL AI's managed clusters by using the command. The command will upload your current directory and run command on the cluster asynchronously. You can use command instead of vessl run to specify detailed options (e.g. volume mounts) in one line.

This metrics and images of the experiment was made possible by calling the and function from our Python SDK, which you can use in your code by simply importing the library as shown in the example .

Use our to automate model tuning.

Use to take full advantage of your GPUs.

Explore to set up and manage on-cloud or on-premise clusters.

example
configure
Sweep
experiment
init()
code
log()
distributed experiment
organization settings
sign up
vessl run
vessl experiment create