Skip to content
witheredAdPublic

About

A flexible, portable schedule & monitor platform for deep learning, with web ui supported.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIT — Flexible Interactive Training

A lightweight GPU experiment scheduler with a built-in web dashboard and real-time log viewer. Write a shell script, add GPU directives as comments, submit it — FIT queues, allocates GPUs, runs the job, and streams logs to your browser.

Quick Start

# Terminal 1: start the daemon
fit daemon

# Terminal 2: submit an experiment
fit test_samples/mlp_demo.exp

Open http://127.0.0.1:8080 for the dashboard.

Installation

Requires Go 1.25+ and Node.js (for building the frontend).

git clone https://github.com/rin/fit.git
cd fit

# Build frontend
cd web-ui && npm install && npm run build && cd ..

# Build binary
go build -o fit ./cmd/fit/

# (optional) install to PATH
cp fit ~/bin/

Usage

Daemon

fit daemon

Starts the background scheduler, REST API, and web dashboard on :8080. All state lives under ~/.fit/.

Submitting Jobs

fit <script.exp>

Parses the .exp file and submits it to the daemon via HTTP.

Experiment File Format

A .exp file is a shell script with embedded directives in comments:

#!/usr/bin/env fit
#F_NAME      MLP Function Fitting Demo
#F_GPUS      1
#F_TRACK_LOGS runs/**/metrics.csv

set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR/dl_demo"

uv run python train.py --epochs 200 --log-interval 20

Directives

Directive Example Description
#F_NAME #F_NAME My Experiment Human-readable experiment name (defaults to filename)
#F_GPUS #F_GPUS 2 Number of GPUs to request (default: 1)
#F_GPU_IDS #F_GPU_IDS 0,1 Specific GPU indices to allocate (default: auto)
#F_TRACK_LOGS #F_TRACK_LOGS runs/**/*.csv Glob pattern for log files to watch

Lines starting with #F_ are parsed as metadata; everything else is the script body executed by bash -e.

Scheduling

  • Jobs are queued in priority order (higher priority runs first)
  • The scheduler polls every 3 seconds and launches one pending job per tick
  • GPUs are allocated via CUDA_VISIBLE_DEVICES

Job Actions

From the web dashboard or API:

  • Top — give a queued job highest priority
  • Hold / Resume — pause or unpause a queued job
  • Cancel — kill a running job
  • Delete — remove a finished job and its logs

Web Dashboard

The dashboard at :8080 shows:

  • GPU Status — per-GPU cards with VRAM usage, compute utilization, and power draw
  • Job Queue — grouped by status (Running, Pending, Held, Finished) with priority controls
  • Log Viewer — real-time terminal emulator via xterm.js with ANSI color support, syntax highlighting, line numbers, and horizontal scrolling

Log Viewer Features

  • Full ANSI 256-color rendering (\x1b[...m escape codes)
  • Carriage return (\r) support for progress bars (e.g., tqdm)
  • Smart syntax highlighting for plain-text logs (log levels, timestamps, URLs, numbers, strings)
  • Copy-safe line number gutter (physically isolated from terminal output)
  • Horizontal scrolling for wide output
  • Chunked rendering for large files via requestAnimationFrame

Environment Variables

Variable Default Description
FIT_FRONTEND_DIR ~/.fit/frontend/ (auto-extracted) Override path to web UI build directory

Data Locations

Path Purpose
~/.fit/ Base directory
~/.fit/fit.db SQLite job database
~/.fit/logs/ Job log files
~/.fit/frontend/ Extracted web UI assets

API

Base: http://127.0.0.1:8080/api

Method Endpoint Description
GET /system/status GPU statuses
POST /jobs Submit a job
GET /jobs List all jobs
GET /jobs/:id Get job details
PATCH /jobs/:id/priority Update priority
POST /jobs/:id/cancel Cancel job
DELETE /jobs/:id Delete job
GET /jobs/:id/logs List log files
GET /jobs/:id/logs/stream SSE log stream
GET /jobs/:id/logs/raw Raw log download

Development

# Frontend dev server (proxies /api to :8080)
cd web-ui && npm run dev

# Run daemon with local frontend
FIT_FRONTEND_DIR=web-ui/dist fit daemon

# Lint & build
cd web-ui && npm run lint && npm run build
go build -o fit ./cmd/fit/

The frontend is embedded into the binary via //go:embed web-ui/dist (embed.go). Always rebuild the frontend before the Go binary.

Tech Stack

Layer Technology
Runtime Go 1.25
Web framework Gin
Database SQLite (pure Go via modernc.org/sqlite)
GPU monitoring NVIDIA NVML (with graceful stub fallback)
Frontend React 19, Vite 8, Tailwind CSS 4
Terminal xterm.js 6
File watching fsnotify

About

A flexible, portable schedule & monitor platform for deep learning, with web ui supported.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages