Run your first experiment on VESSL
To run your first experiment on VESSL AI, first sign up 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.
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
vessl configure \
--organization quickstart \
# 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
You can also run experiments using VESSL AI's managed clusters by using the
vessl runcommand. The command will upload your current directory and run command on the cluster asynchronously. You can use
vessl experiment createcommand instead of
vessl runto specify detailed options (e.g. volume mounts) in one line.
experiment create (inquiry)
experiment create (one line)
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
[?] Resource: v1.cpu-0.mem-1
[?] Image URL: public.ecr.aws/vessl/kernels:py36.full-cpu
[?] Command: cd local && pip install -r mnist/keras/requirements.txt && python mnist/keras/main.py --save-model --save-image
vessl experiment create \
--cluster aws-apne2-prod1 \
--resource v1.cpu-0.mem-1 \
--image-url public.ecr.aws/vessl/kernels:py36.full-cpu \
--command 'cd local && pip install -r mnist/keras/requirements.txt && python mnist/keras/main.py --save-model --save-image'
Once the command completes, you will be given a link to Experiments. The experiment page stores logs, visualizations, and files specific to the experiment.
# Initialize new experiment via VESSL SDK
# Train function and log metrics to VESSL
def train(model, device, train_loader, optimizer, epoch, start_epoch):
loss = 0
for batch_idx, (data, label) in enumerate(train_loader):
# Logging loss metrics to VESSL
step=epoch + start_epoch + 1,
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
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.
Now that you are familiar with the overall workflow of VESSL AI, explore additional features available on our platform and start building!