Skip to content

GUI task concurrency: run analysis/captions alongside training - #66

Open
scragnog wants to merge 8 commits into
koda-dernet:mainfrom
scragnog:pr/gui-concurrency
Open

GUI task concurrency: run analysis/captions alongside training#66
scragnog wants to merge 8 commits into
koda-dernet:mainfrom
scragnog:pr/gui-concurrency

Conversation

@scragnog

Copy link
Copy Markdown

GUI task concurrency: run analysis/captions alongside training

Stacked on #65 (shares task-manager plumbing) — merge that first; until then this diff includes its commits.

The task manager previously allowed exactly one task at a time, so a multi-hour training run blocked all dataset work. This PR teaches it which combinations are safe:

  • training + AI captions can run concurrently (captions use CPU/API or a small local model)
  • training + audio analysis can run concurrently
  • "Run Both" button: audio analysis and AI captions for a dataset in one click, running concurrently
  • Pipeline mode for the Analyze → Caption button: analysis output feeds captioning automatically when run as a pair

🤖 Generated with Claude Code

Rob Work PC and others added 8 commits July 29, 2026 11:32
… offset

- load_run_config now merges sidestep_adapter_config.json from final/,
  the run root, or the highest epoch_N checkpoint so the GUI resume
  dialog shows real rank/alpha (maps PEFT 'r' -> 'rank')
- training chart: xOffset support so a resumed run's X-axis labels
  continue from the original epoch instead of restarting at 0;
  session-relative step timing in the stats row
- (the adapter weight-loading half of the original fix is superseded by
  the upstream resume strategy ladder from koda-dernet#46 and is not included)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pause captures a complete resumable checkpoint (adapter, optimizer,
scheduler, RNG state, EMA shadow) and stops cleanly; resume restarts
from it via the normal resume path. GUI gains pause/resume controls
with progress-file handshake.

(from 4ef9343; patch1.diff/patch2.diff scratch files excluded)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…art, and PC reboot

- Backend: GET/POST /api/train/queue endpoints store queue state to .sidestep/training_queue.json
- Frontend: debounced _saveQueueState() on every queue mutation (enqueue, pause, resume, remove, clear)
- Frontend: _loadQueueState() in init() restores queue on page load
- Running entries reclassified as 'interrupted' on reload (resumable like paused)
- Queue panel now shows paused/interrupted entries with inline resume buttons
Advanced page:
- 'Use dataset name as run name' checkbox: when checked, run_name
  is automatically set to the dataset folder basename (e.g. 'my_band')
  instead of 'lokr_turbo'. Updates on dataset change.
- 'Batch mode' checkbox: reveals a multi-select checklist of all
  available datasets below the dataset picker.
- 'Queue Selected' button: generates one training config per checked
  dataset, using the dataset name as run_name, and enqueues them all
  in one click. All/None selection helpers included.
- Single-dataset workflow unchanged — existing Start Training button
  and single select still work as before.
- Relax task mutex to allow audio_analyze + captions to run in parallel
- Add _COMPATIBLE_KINDS matrix and active_operations() method
- Extract _startAnalyze() and _startCaptions() as reusable functions
- Add initRunBoth() with parallel (remote) / sequential (local GPU) logic
- New 'Analyze + Caption' button in Audio Library toolbar
Producer-consumer pipeline: analysis processes file N then pushes it
to a shared queue for captioning, while analysis moves to file N+1.
This ensures analysis-written sidecar fields (bpm, key, signature)
are present before captioning runs, so the caption provider skips
already-filled fields.

- Add start_pipeline() with shared cancel flag between both tasks
- Extract _build_caption/metadata/lyrics_fn_from_config() as reusable
  static methods on TaskManager
- Add /api/pipeline/start endpoint
- Add API.runPipeline() frontend function
- Rewrite initRunBoth() to use pipeline with dual progress streaming
- Button label → '⚡ Analyze → Caption' to show pipeline nature
Remote captioning is pure network I/O — no GPU contention with training.
Local caption providers would compete for VRAM but OOM detection handles it.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@scragnog, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d8d2bc95-b217-4268-9850-bced443a6291

📥 Commits

Reviewing files that changed from the base of the PR and between ecd13bd and 3de8949.

📒 Files selected for processing (13)
  • frontend/index.html
  • frontend/js/api.js
  • frontend/js/training-chart.js
  • frontend/js/training.js
  • frontend/js/workspace-config.js
  • frontend/js/workspace-lab.js
  • frontend/js/workspace-setup.js
  • frontend/js/workspace.js
  • sidestep_engine/core/run_discovery.py
  • sidestep_engine/core/trainer.py
  • sidestep_engine/core/trainer_loop.py
  • sidestep_engine/gui/server.py
  • sidestep_engine/gui/task_manager.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@scragnog
scragnog marked this pull request as ready for review July 29, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant