Skip to main content
See Dataset Management for the workflow walkthrough.

sf dataset prepare

Discovers common/data/prepare_*.py by convention and runs it locally to produce the data directory.

sf dataset push

Upload features: streaming chunks, per-file SHA256, resumable upload (rerunning after an interruption automatically skips files already uploaded). Drop a README.md in the directory and push publishes it as the dataset card (below).

sf dataset card

The card belongs to the dataset, not to one version: fixing the description does not force you to push a new version of the data. Its first paragraph becomes the one-line description shown on every row of sf dataset ls and of the console list.

sf dataset check — catch contamination before you push

What this guards against is accidentally training on the test set: slicing train/test from the same public dataset, or picking up someone’s cleaned mixture that happens to contain GSM8K. The damage is a score that is inflated and nobody notices — the model scores 90 on questions it memorised, you ship on that number, and production does not match. It reports which rows, because the action you need to take is “delete these”:
Exit code is 1 when there is overlap — drop it into CI and a contaminated push gets stopped. --fields narrows it to the question text: the same word appearing in an answer is not contamination. Matching uses normalised 13-grams (the window used in the GPT-3 and PaLM contamination analyses). Case, punctuation and full-width/half-width forms do not affect the verdict; Chinese is shingled by character, since splitting on spaces would turn a whole sentence into one token and find nothing.

sf dataset quality — is this data clean in itself

sf dataset push computes this automatically and stores it with the version, where the console shows it at the top of the dataset page. This command is for looking before you push. Four numbers, each guarding against a different failure: It counts only what a machine can definitively count. “Is this a good answer” is a judgement made by a person or a model, and belongs to preference annotation instead. Near-duplicates use a small MinHash. Template-generated data — fifty records differing by one number — is reported as duplicated, and that is not a false positive. It is precisely the kind of thing this report exists to say out loud.

Contamination fingerprints (comparing across the wire)

sf dataset push also computes an n-gram fingerprint (a sampled set of hashes, a few hundred KB) and uploads it with the version. Push already reads every file once to compute sha256, so shingling costs almost nothing there — whereas computing it later means pulling gigabytes back out of object storage, which is expensive enough that nobody ever does it. With fingerprints on both sides, comparing two datasets is just a set intersection:
For data that does not live on the platform (a benchmark’s test split, say):
Fingerprint comparison is an estimate: sampling only allows false negatives, and a very small dataset may have nothing sampled at all. Use sf dataset check for small sets — it names rows, the fingerprint only gives a ratio. Versions pushed before this feature existed have no fingerprint, and the endpoint says so explicitly rather than returning a false “no contamination”.

sf dataset ls / visibility

Each ls row carries the latest version, file count, size, formats and update time:

Referencing in Training

On job start the dataset is automatically distributed to the cluster’s shared cache and <NAME>_DATA_DIR is injected; it is recommended to pin the reference in the experiment config under data.train.dataset.

sf dataset

Manage datasets

sf dataset card

Show/update a dataset description (README.md)

sf dataset check

Check training data for evaluation overlap

sf dataset fingerprint

Compute a dataset fingerprint

sf dataset ls

List the visible datasets

sf dataset prepare

Preprocess a dataset locally
No options beyond --help.

sf dataset push

Upload one dataset version

sf dataset quality

Produce a dataset quality report

sf dataset visibility

Change a dataset’s visibility (owner or admin)