Work with Data

Download data from cloud storage directly into your notebook environment using Valohai inputs. Configure inputs when launching your notebook, then access them in your code.

Configure Inputs

When creating a notebook execution, add inputs in the configuration panel. An input can point to a single file or multiple files using wildcards.

Input URL Formats

Public cloud storage

Downloads a single file from a public URL.

Private data stores

Downloads a single file from your configured S3 data store. You can use also other object data stores (azure://, gs:// etc.)

Multiple files with wildcards

Downloads all files in the pytorch-sample folder.

Valohai downloads these files before your notebook starts. They're available immediately when you open Jupyter.

Access Files in Your Notebook

Use environment variables to locate your input files. This prevents errors from hardcoded paths.

💡 Recommended: Always use VH_INPUTS_DIR and VH_OUTPUTS_DIR environment variables. This keeps your code consistent between notebooks and executions.

Using valohai-utils

The 🐍 valohai-utils library handles path resolution automatically.

Using environment variables

This approach works in both notebooks and standard executions, making it easier to migrate code later.

Working with Multiple Files

If your input uses a wildcard pattern, all matching files appear in the input directory:

Next Steps

Last updated

Was this helpful?