- main.zig: Update command dispatch and usage text - Wire up new commands: note, logs, sync, cancel, watch - Remove deprecated command references - Updated usage reflects unified command structure - Delete deprecated command files: - annotate.zig (replaced by note.zig) - experiment.zig (functionality in run/note/logs) - logs.zig (old version, replaced) - monitor.zig (unused) - narrative.zig (replaced by note --hypothesis/context) - outcome.zig (replaced by note --outcome) - privacy.zig (replaced by note --privacy) - requeue.zig (functionality merged into queue --rerun) |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| tests | ||
| build.zig | ||
| Makefile | ||
| README.md | ||
| src.zig | ||
ML CLI
Fast CLI tool for managing ML experiments. Supports both local mode (SQLite) and server mode (WebSocket).
Quick Start
# 1. Build
zig build
# 2. Initialize local tracking (creates fetch_ml.db)
./zig-out/bin/ml init
# 3. Create experiment and run locally
./zig-out/bin/ml experiment create --name "baseline"
./zig-out/bin/ml run start --experiment <id> --name "run-1"
./zig-out/bin/ml experiment log --run <id> --name loss --value 0.5
./zig-out/bin/ml run finish --run <id>
Commands
Local Mode Commands (SQLite)
ml init- Initialize local experiment tracking databaseml experiment create --name <name>- Create experiment locallyml experiment list- List experiments from SQLiteml experiment log --run <id> --name <key> --value <val>- Log metricsml run start --experiment <id> [--name <name>]- Start a runml run finish --run <id>- Mark run as finishedml run fail --run <id>- Mark run as failedml run list- List all runs
Server Mode Commands (WebSocket)
ml sync <path>- Sync project to serverml queue <job1> [job2 ...] [--commit <id>] [--priority N] [--note <text>]- Queue jobsml status- Check system/queue statusml validate <commit_id> [--json] [--task <task_id>]- Validate provenanceml cancel <job>- Cancel a running/queued job
Shared Commands (Auto-detect Mode)
ml experiment log|show|list|delete- Works in both local and server modeml monitor- Launch TUI (local SQLite or remote SSH)
Notes:
- Commands auto-detect mode from config (
sqlite://vswss://) --jsonmode is designed to be pipe-friendly
Configuration
Local Mode (SQLite)
# .fetchml/config.toml or ~/.ml/config.toml
tracking_uri = "sqlite://./fetch_ml.db"
artifact_path = "./experiments/"
sync_uri = "" # Optional: server to sync with
Server Mode (WebSocket)
# ~/.ml/config.toml
worker_host = "worker.local"
worker_user = "mluser"
worker_base = "/data/ml-experiments"
worker_port = 22
api_key = "your-api-key"
Building
Development
cd cli
zig build
Production (requires SQLite in assets/)
cd cli
make build-sqlite # Fetch SQLite amalgamation
zig build prod # Build with embedded SQLite
Install
# Install to system
make install
# Or copy binary manually
cp zig-out/bin/ml /usr/local/bin/
Need Help?
ml --help- Show command helpml <command> --help- Show command-specific help