Buckets, connections and transfers
The Data page holds what is too big for the workspace. Buckets store datasets, checkpoints and outputs on Neural Studio's own storage, outside the workspace. Transfers copy data in bulk between the workspace or a bucket and storage you already own at other providers, which you register once as a connection in Workspace settings. A transfer runs on the platform, not on a runtime, so nothing has to be running while it copies.
Buckets
A bucket is a named store for large files. It belongs to your account, not
to one workspace, and every file in it has an address,
ns://<bucket>/<path>, that works the same in a notebook, a runtime's
terminal, your laptop and a cluster.
ns bucket create my-data
ns cp -r ./dataset ns://my-data/dataset/ # from your laptop
ns cp -r ns://my-data/dataset/ /scratch/data # in a runtime, no key needed
- Moving data. The
nscommand (ns ls,ns cp,ns mv,ns rm,ns sync) and the SDK (neural_studio.data), version 0.3.0 or later. Files go straight between your machine and storage in parallel parts; the API only hands out signed links, so a large copy is limited by your network, not by the platform. An interrupted copy resumes when you run it again. - Where it is visible. A bucket is visible in one, some or all of its account's workspaces, read-write or read-only in each. The members of a workspace it is visible in can use it at that level; anyone else is told it does not exist. The same files are seen everywhere it is visible: nothing is copied, and the bytes count once.
- Creating. A bucket created in a workspace belongs to the account that
owns that workspace, whoever creates it, and starts visible in that
workspace only, read-write. Names are 3 to 63 lowercase letters, digits
and hyphens, starting and ending with a letter or digit;
workspaceandcheckpointsare reserved. An account can own up to 100 buckets (support can raise this for an account), counted across all of its workspaces; a bucket created in a workspace counts for that workspace's owner. A deleted bucket stops counting at once. - Sharing. Only the account that owns a bucket can change where it is visible, and only among workspaces it owns. Making a bucket visible in a workspace shows its data to that workspace's members.
- Roles. Viewers can list, browse and download. Editors and the owner can also upload, move, delete, and create or delete buckets. A bucket that is read-only in a workspace refuses every write from that workspace.
- Storage pool. A bucket's bytes count in its owning account's storage pool, next to the workspaces' files, once however many workspaces see it. The pool's owner can make it larger with extra storage, 100 GB blocks for $5 per month each. An upload or a copy that would not fit is refused before anything moves, with what it needs and what is free. An upload in progress holds its size in the pool until it finishes, is cancelled, or expires after 24 hours.
- Reading from other libraries.
ns credentials <bucket>anddata.credentials(...)give one-hour, read-only S3 credentials for that one bucket, for boto3, s3fs, PyArrow or the AWS CLI. Writes go throughnsand the SDK, which keep listings and the pool exact. - When access ends. Removing a bucket from a workspace, or a member from a workspace, cuts access at once. A download link already handed out keeps working for at most 15 minutes, and read credentials for at most an hour.
- Deleting. Deleting a bucket deletes everything in it; a bucket that
still holds files needs
--force. Deleting a workspace deletes the buckets visible only in that workspace; a bucket still visible in another workspace is kept. Erasing an account deletes every bucket it owns, except that a bucket visible only in a workspace handed to another member goes with that workspace. An account that has had no subscription for 90 days loses every bucket it owns, with its workspaces; see Limits. - Limits. One file can be up to 5 TiB. A path is at most 985 bytes of
UTF-8 and each name in it at most 255 bytes, with no control characters,
backslashes, empty names,
.or...
ns://workspace/<path> names the workspace's own files with
the same commands; copying between a bucket and the workspace works inside a
runtime only. See the CLI.
Bucket folders on a runtime
On a runtime, every bucket visible in the workspace also appears as a
folder at ~/buckets/<bucket>, so ls, file dialogs and cp find your data
with nothing to set up.
ls ~/buckets/my-data/dataset
cp ~/buckets/my-data/config.yaml .
- Read only. The folders are for finding and reading data. Saving a file
in one fails; upload with
ns cpor the SDK. A bucket that is read-write in the workspace is still read-only as a folder. - Large files read fast; many small files do not. A folder reads a big
file at full speed, but listing and opening thousands of small files
through it is slow, as on every platform. For a dataset of many small
files, copy it to
/scratchfirst, or stream it from the bucket:ns cp -r ns://my-data/dataset/ /scratch/data. - Staying current. A bucket made visible in the workspace while the runtime runs appears within about a minute; one that is no longer visible disappears. A new upload shows up within about a minute too.
- How many. A runtime shows up to 16 buckets as folders. Any others are
still reachable with
nsand are listed in~/buckets/README. - Older environments. The folders need a program that environments built before this feature do not have. Rebuild the environment to get them; until then the runtime starts as usual and the runtime's Connect menu says the environment needs a rebuild.
- Cache. Files read through a folder are kept on
/scratchso a second read is local, up to 512 MiB per folder. A file bigger than that is read from the bucket every time; if you read it often, copy it to/scratchwithns cpfirst. - What a folder shows. A folder shows the bucket's storage directly, so
for a short while it can differ from
ns lsand the Buckets tab: a file you just deleted can still appear, and a file that is still being saved can show up a moment early. - Restricted network. On a runtime whose environment restricts its network, the folders may not mount; the runtime's Connect menu shows why, and the runtime is otherwise unaffected.
The Buckets section of the runtime's Connect menu, and the Buckets tab, show each bucket's folder path. See Notebooks.
The Buckets tab
The Buckets tab on the Data page lists the buckets visible in the workspace you are in, with each one's size, how many files it holds, and a Read only or Read and write badge for this workspace. Owned by you marks the buckets your account owns.
- Create. New bucket asks for a name and creates the bucket in this workspace.
- Browse. Click a bucket's name to open it. It shows one folder at a time, folders first; the path above the list takes you back up, and Load more shows the rest of a large folder.
- Upload. Upload files and Upload folder send files into the folder you are in; a folder keeps its own folders inside. Progress shows in the uploads tray, which stays on screen while you move around the app. An upload that stopped part way continues where it stopped when you upload the same file to the same place within 24 hours.
- Download. Tick files and choose Download, or use a file's own download button. Your browser saves each file.
- Delete. Tick files and choose Delete, or use a folder's delete button to delete it with everything inside. A bucket's delete button deletes the bucket; one that still holds files needs Delete everything in this bucket ticked first.
- Folder on the runtime. While a runtime with bucket folders is running,
each bucket shows its folder path (
~/buckets/<bucket>) under its size, or why it has none. - Addresses and code. The copy buttons copy the
ns://address of a file, a folder or the bucket, and Use in a runtime shows thensand Python commands for the folder you are in, plus the settings for your laptop. When you can't write to the bucket in this workspace (it is read only here, or you have view-only access), it shows only the commands that read, and says why. - Visible in… on a bucket your account owns chooses where it is visible: This workspace only, Workspaces I choose, or All my workspaces (including workspaces you create later), each Read only or Read and write.
- All my buckets lists every bucket your account owns, whichever workspace is open, with its size and where it is visible.
- Import… opens a new transfer into the folder you are in, from a connection or from Hugging Face (see Transfers).
Viewers, and anyone on a bucket that is Read only here, can browse and download; the upload and delete controls are off, and the tab says why.
Connections
Add connection in Workspace settings, on the Connections tab, asks for a provider first:
| Provider | Sign-in | Notes |
|---|---|---|
| Amazon S3 | IAM role (recommended) or access keys | Your own bucket. Validation detects the bucket's real region. |
| Public S3 bucket | Anonymous | A bucket that allows anonymous reads, such as an open dataset. |
| Cloudflare R2 | Access keys | S3-compatible. |
| Backblaze B2 | Access keys | S3-compatible. |
| Wasabi | Access keys | S3-compatible. |
| DigitalOcean Spaces | Access keys | S3-compatible; the container is a Space. |
| Other S3-compatible | Access keys or anonymous | MinIO, Ceph, or any S3 API over HTTPS; you give the endpoint URL. |
| Google Cloud Storage | Workload Identity Federation (recommended) or a service-account key | |
| Azure Blob Storage | Container SAS token | A container in a storage account. |
Then:
- Name (how it appears in the workspace), the bucket, Space or container, and an optional Prefix: the root folder inside the bucket that the connection is limited to.
- Access mode: read-only, which allows imports into the workspace, or read-write, which also allows exports. Anonymous connections are always read-only.
- Authentication for the provider. For an IAM role the Setup guide gives you the connector's role ARN, an External ID, and the trust and permissions policies to paste into your AWS account. For Workload Identity Federation it asks for the project number, pool and provider ids, and an optional service account to impersonate.
Credentials are write-only: once saved they are never shown again, and Edit lets you supply new ones. Each connection has Validate (checks the credentials and the bucket), Browse (lists what the connection can see), Setup guide and Delete. Viewers see connections and can browse them; adding, editing, validating and deleting need an editor.
Transfers
New transfer on the Transfers tab, or Import from cloud… and Export to… on the Files page, starts a copy:
- Direction: import into the workspace, or export from it. Exporting needs a read-write connection.
- Connection, a remote path relative to the connection's prefix, and the workspace folder.
- Existing files: Skip existing (only copy what the destination does not have; re-runs resume), Update if newer (also replace files whose source copy is newer), or Overwrite.
- Verification: Size (fast) or Checksum (slower).
- Include patterns and Exclude patterns to copy part of a tree, an optional Bandwidth limit (Mbps), and a Runner size (large runners copy many small files faster).
- Estimate (whole path) counts files and bytes before you commit.
A transfer copies. It never deletes anything from your own cloud bucket, and only Move to bucket deletes from your workspace (see below). Progress shows on the Transfers tab with Transfer details for the full record, and a transfer can be cancelled while it is queued or running.
Into a bucket
The Destination of an import can be A bucket instead of a workspace folder: pick a bucket that is read and write in this workspace and a folder inside it. Files appear in the bucket as the copy goes, and the transfer counts against your storage pool like an upload: the space it needs is set aside before it starts, and a transfer that would not fit is refused before anything is copied. An export can also read from a bucket folder instead of a workspace folder, even a bucket that is read only in this workspace.
A bucket transfer works with every kind of connection. The connection and the bucket each use their own short-lived credentials, and neither can be used for the other.
From Hugging Face
Choose Hugging Face as the source to import a model or dataset into a bucket folder:
- Repository, such as
openai-community/gpt2, and whether it is a Model or a Dataset. - Revision: a branch, a tag or a commit (default
main). The import copies the files of one commit, even if the branch moves while it runs. - Include patterns and Exclude patterns to take part of a
repository, for example
*.safetensorsand*.json. A pattern matches the whole path, and*also matches/. - Token, for a gated or private repository: save your Hugging Face token as a workspace secret first, then choose it here by name. The token is only sent to huggingface.co.
Every file is checked against the size and checksum Hugging Face publishes before it is saved; a file that does not match is not saved and is listed in Transfer details. A file that fails for a temporary reason (a dropped connection, Hugging Face busy or asking to slow down) is tried again up to 3 times before it counts as failed. Running the same import again skips the files the bucket already has and copies the rest.
Move to bucket
Move to bucket… on the Files page moves a folder, or the files you selected inside a folder, out of your workspace into a bucket folder. The top level of the workspace cannot be moved as a whole. It is how you make room in your workspace for code and small files and keep large data in a bucket. Stop the workspace's runtime first: a move does not start, and does not delete anything, while a runtime is running, because files a running runtime is still writing cannot be checked, and while it deletes, a runtime cannot be started in that workspace. It works in three steps:
- The files are copied into the bucket.
- Every file is checked once: the copy in the bucket is read back and compared with the file in your workspace, and the file must not have changed since the move started.
- Only then are the files deleted from your workspace, along with folders left empty.
If any file fails to copy or check, nothing is deleted from your workspace; the bucket keeps the copy, and running the move again finishes it. Until then the copied files count toward your storage twice; delete them in the bucket if you no longer want them there. A file that changes while the move is deleting stays in your workspace. A file with the same name and size already in the bucket folder is kept if its content matches; if it differs, the move stops and names it, so you can delete or rename it in the bucket first. A move works even when your storage is full, since the files already count against it.
From a laptop, ns mv -r ns://workspace/<folder>/ ns://<bucket>/<folder>/
starts the same move, and ns cp -r the same steps without deleting anything
(a copy does not need the runtime stopped; see
the ns command).
Limits and billing
- One transfer executes per workspace at a time, with up to 5 queued.
- A single transfer may run for at most 24 hours.
- An import is checked against your storage pool's free space before it starts; a dataset larger than the space left is refused up front. To work with data larger than your pool, read it from the bucket directly from a cell instead, with the credentials in workspace secrets.
- Transfers are free. Imported data counts against your pool like any other file, in a bucket as in the workspace.
- A Hugging Face import selects at most 100,000 files, and a move at most 250,000.
Related
- The ns command and the Python SDK: every bucket operation.
- Files: where imported data lands.
- Packages in your runtime: what belongs in the workspace and what belongs on the runtime's scratch disk.
- Limits: every number on one page.