@tuned-tensor/cli 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -72,7 +72,7 @@ npm install -g --ignore-scripts @tuned-tensor/cli
72
72
  tt --version
73
73
  ```
74
74
 
75
- Uninstall with `npm uninstall -g @tuned-tensor/cli` (add
75
+ Upgrade later with `tt upgrade`. Uninstall with `npm uninstall -g @tuned-tensor/cli` (add
76
76
  `--prefix ~/.local` if the curl installer used that prefix).
77
77
 
78
78
  Node.js 22.19.0 or newer is required. Training additionally needs
@@ -156,10 +156,19 @@ catalog providers remain available by ID. Unauthenticated entries are marked
156
156
  `auth required`. Local endpoints such as Ollama use a placeholder `apiKey` in
157
157
  `models.json` and need no TT account.
158
158
 
159
- Before the shell opens, `tt` performs a short, non-blocking npm version check.
160
- If a newer stable release is available it recommends
161
- `npm install -g @tuned-tensor/cli@latest`; offline or unavailable registry
162
- checks are ignored.
159
+ `tt` checks npm for a newer stable release at most every 12 hours and
160
+ remembers the answer in `~/.tuned-tensor/update-check.json`. The notice appears
161
+ when the shell opens and after commands run in a terminal; explicit commands
162
+ never wait on the registry. Upgrade with:
163
+
164
+ ```bash
165
+ tt upgrade # latest stable, into the same npm prefix tt runs from
166
+ tt upgrade --check # only report
167
+ tt upgrade beta # or a specific version
168
+ ```
169
+
170
+ Offline or unavailable registry checks are ignored. `CI`, `TT_NO_UPDATE_CHECK=1`
171
+ or `NO_UPDATE_NOTIFIER=1` disable the check.
163
172
 
164
173
  After a model is selected, the banner shows it and ordinary sentences go to
165
174
  the agent:
@@ -460,6 +469,12 @@ tt pipeline run --spec tunedtensor.json --dry-run
460
469
  tt pipeline run --spec tunedtensor.json
461
470
  ```
462
471
 
472
+ `tt models prefetch` shows a progress bar with transfer rate and ETA. Large
473
+ downloads survive flaky networks: TT pins the requested revision to one commit,
474
+ retries interrupted transfers with backoff (`TT_HF_DOWNLOAD_MAX_ATTEMPTS`,
475
+ default 10), and keeps completed files in the Hugging Face cache, so running the
476
+ command again resumes instead of starting over.
477
+
463
478
  These commands read runtime and evaluation settings from the core spec. The preview needs
464
479
  no GPU or AWS connection. Results return to the local run and model stores:
465
480
 
@@ -468,6 +483,83 @@ tt runs report <run-id>
468
483
  tt models verify local-<run-id>
469
484
  ```
470
485
 
486
+ ### Train on a Hugging Face dataset
487
+
488
+ Point `dataset_prebuilt` at files in a Hugging Face dataset repo instead of
489
+ local paths. It works like `base_model`: name the repo, pin a commit, and TT
490
+ downloads it into the same Hugging Face cache.
491
+
492
+ ```json
493
+ {
494
+ "dataset_prebuilt": {
495
+ "huggingface": {
496
+ "repo": "SetFit/tweet_sentiment_extraction",
497
+ "revision": "0d5359cfbb2470332f2b82e62269cf755e0ac5c3",
498
+ "columns": { "input": "text", "output": "label_text" }
499
+ },
500
+ "training": "train.jsonl",
501
+ "test": "test.jsonl"
502
+ }
503
+ }
504
+ ```
505
+
506
+ ```bash
507
+ tt datasets prefetch tunedtensor.json # download with progress; rerun to resume
508
+ tt datasets verify tunedtensor.json # offline checksum check of the cached files
509
+ tt pipeline run --spec tunedtensor.json # downloads automatically if still missing
510
+ ```
511
+
512
+ - Split paths are files inside the repo and must be JSONL. Parquet and CSV are
513
+ not supported yet.
514
+ - Without `columns`, files must already be TT chat JSONL whose system message
515
+ matches the spec. With `columns`, each record's `input` and `output` fields
516
+ become chat rows that use the spec's instruction. Records missing either
517
+ field are skipped. Evaluation splits keep the first of any duplicate input,
518
+ and training drops inputs that also appear in an evaluation split. The run
519
+ report lists every skipped or dropped count.
520
+ - Without `revision`, TT uses the cached `main` snapshot and records the commit
521
+ it resolved. `tt validate` and `tt datasets prefetch` flag the spec as
522
+ unpinned. Pin the commit for reproducible runs.
523
+ - Runs never contact the Hub after the download. Each run checks every file
524
+ against its content-addressed blob and records the repo, commit, file
525
+ SHA-256s and conversion counts in `run_metadata.dataset_source`.
526
+ - Gated datasets use `HF_TOKEN`, as model downloads do.
527
+
528
+ ### Run records and audit
529
+
530
+ `tt pipeline run` prints each stage live with the time since the run started.
531
+ `--verbose` adds training and evaluation process output, and `--quiet` hides
532
+ both. Full logs stay in the run directory either way.
533
+
534
+ Every run report has a `provenance` block recording what produced it:
535
+
536
+ - TT, Node and platform versions, and the digest of the locked Python runtime;
537
+ - where training ran (local, or the AWS instance and region);
538
+ - the spec file and snapshot digests;
539
+ - the base model id, revision and content fingerprint;
540
+ - every dataset file's SHA-256, the compiled training data digest, and the
541
+ evaluation split and seed;
542
+ - the hyperparameters and the training exit code.
543
+
544
+ The run's event log is hash-chained: each event records the previous event's
545
+ hash. When a run completes, TT records the report's SHA-256.
546
+
547
+ ```bash
548
+ tt runs audit <run-id>
549
+ ```
550
+
551
+ `tt runs audit` checks the event chain and re-hashes the report, then prints
552
+ the stage timeline with durations and the provenance. Its verdict is
553
+ `verified`, `incomplete` (older TT versions or unfinished runs) or `tampered`.
554
+ `tampered` exits with code 2 and names the edited event or file; removing the
555
+ completion event or emptying the log also counts as tampering.
556
+
557
+ `tt publish` runs the same audit and uploads the summary with the report. It
558
+ refuses tampered evidence. It also stops on unverifiable evidence, such as runs
559
+ from older TT versions or logs with unreadable lines, unless you pass
560
+ `--allow-unverified`. The chain makes edits evident; it is not a signature, so
561
+ anyone with write access to the store can rewrite the whole log.
562
+
471
563
  Serving still runs on the machine executing `tt serve` and requires a local
472
564
  Linux/CUDA GPU, even when training used AWS:
473
565