- Update Makefile with build-sqlite target matching rsync pattern - Fix build.zig to handle SQLite assets and dataset_hash linking - Add SQLite asset detection mirroring rsync binary detection - Update CLI README with local mode documentation - Restructure rsync assets into rsync/ subdirectory - Remove obsolete files (fix_arraylist.sh, old rsync_placeholder.bin) - Add build_rsync.sh script to fetch/build rsync from source
2.5 KiB
2.5 KiB
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