Manage Files
NeMo Helix provides a file storage interface through the Files service. The Files service supports multiple storage backends and can be used to store datasets for training, evaluation results, model artifacts, and other files.
Concepts
- Fileset: A named container that holds files.
Filesets are uniquely identified by a name within a given workspace.
- Storage Backend: Each fileset is backed by a storage backend where the files are actually persisted. Supported backends include:
local: Local filesystem storage (default, read/write)s3: Amazon S3 or S3-compatible storage such as MinIO (read/write)ngc: NVIDIA GPU Cloud storage (read-only)huggingface: HuggingFace Hub repositories (read-only)
Read-only backends allow you to create a fileset that acts as a handle to external resources. This provides a unified interface to access files from different sources using the same SDK methods, and allows other Helix services to reference external data through a fileset.
-
Purpose: A fileset field that indicates the intended use. Each purpose enables specific metadata fields under the corresponding key. Select a tab below to see the available metadata fields for each purpose:
generic
dataset
model
Use
purpose="generic"(default) for other files that don’t fit thedatasetormodelcategories.Metadata fields: No purpose-specific metadata fields.
These fields are merged into the model entity spec by the model-spec background task.
-
Custom Fields: Arbitrary key-value data attached to a fileset via
custom_fieldsfor user-defined metadata.
Managing Filesets
Fileset management operations (create, retrieve, list, delete) are available through the CLI (nemo files filesets) or the SDK (client.files, for example create_fileset, list_filesets, get_fileset, delete_fileset).
CLI commands use the workspace from your current context by default. Use --workspace to specify a different workspace:
All Python SDK examples that follow assume this client initialization:
These examples use the default workspace. If your current CLI context uses a different workspace, run nemo config set --workspace default first. To check, run nemo config view.
Creating Filesets
Creating a fileset involves specifying a name and workspace. You can optionally provide a description, purpose, and custom storage configuration.
CLI
Python SDK
Listing Filesets
List all filesets in a given workspace:
CLI
Python SDK
Filter filesets by purpose or storage type:
CLI
Python SDK
Use pagination for large result sets:
CLI
Python SDK
Inspect and Filter by Creator or Updater
Fileset responses include created_by (the principal ID that created the fileset) and updated_by (the principal ID recorded for its last update). These are server-managed attribution fields, alongside created_at and updated_at, not entries in metadata or custom_fields. They are not editable creator/owner settings. The values can be null when attribution is unavailable; do not assume a principal ID is an email address or display name.
First inspect a fileset you can read. The following uses my-files from Creating Filesets, in the workspace selected by your CLI context:
Copy a non-null created_by or updated_by value from the response. To find filesets attributed to that principal, replace principal-id-from-response below with that exact value:
Use the JSON --filter option: the 0.9 CLI does not have --filter.created-by or --filter.updated-by shortcuts for filesets. Filtering does not grant access to other users’ data; results remain limited by the workspace and your permissions. Add --workspace consistently for another workspace, and use --all-pages if you need every matching page rather than the first page. JSON output exposes attribution fields that the default list table does not display.
The Python SDK can reuse a returned identity without manually copying or JSON-escaping it:
To filter by the last updater instead, use a non-null fileset.updated_by and the updated_by filter key. Supplying both keys matches filesets satisfying both conditions, not either condition. For more operators and filter composition, see Filtering.
These fields describe the fileset entity’s recorded attribution, not a per-file audit trail or proof of who authored every stored byte.
Deleting Filesets
Create and delete a disposable fileset, leaving my-files available for the file-management examples below:
CLI
Python SDK
Deleting a fileset is permanent and cannot be undone. For local and s3 storage backends, this also deletes all underlying files.
Managing Files Within Filesets
File operations are available through the CLI (nemo files) or the SDK (client.files), which provide methods for uploading, downloading, and listing files.
For advanced use cases, an fsspec-compatible filesystem is available through the filesets package (FilesetFileSystem). Refer to the fsspec documentation for additional methods.
Uploading Files
Upload files to a fileset:
CLI
Python SDK
Upload without specifying a fileset to auto-create one:
The CLI nemo files upload supports uploading an entire directory and auto-creating a fileset when you omit the fileset name (generating a name like fileset-a1b2c3d4). The SDK upload_file uploads one file to an existing fileset.
Listing Files
List all files in a fileset:
CLI
Python SDK
List files under a specific directory:
CLI
Python SDK
Downloading Files
Download files to a local path:
CLI
Python SDK
Read file content into memory (SDK only):
Deleting Files
Delete files from a fileset:
CLI
Python SDK
Using Progress Callbacks
The CLI displays progress bars automatically during uploads and downloads. This section covers custom progress handling with the fsspec-compatible FilesetFileSystem from the filesets package, which accepts a progress callback.
Track progress during large file transfers using the RichProgressCallback context manager:
Use Cases
Using External Storage Backends
Connect to files stored in NVIDIA GPU Cloud (NGC):
CLI
Python SDK
Connect to a HuggingFace repository:
CLI
Python SDK
Connect to an S3 bucket or S3-compatible storage (e.g., MinIO, Ceph):
These optional S3/MinIO examples are not exercised by default in E2E. Set NHX_RUN_S3_TUTORIAL=true to run them.
CLI
Python SDK
For S3-compatible storage like MinIO, use explicit credentials and a custom endpoint: