refactor(scheduler): migrate task scheduler to circuitforge-core #47

Open
pyr0ball wants to merge 0 commits from feature/shared-task-scheduler into main
Owner

Summary

  • Replaces scripts/task_scheduler.py full implementation with a thin shim over circuitforge_core.tasks.scheduler
  • TaskScheduler subclasses _CoreTaskScheduler to preserve backward-compat: enqueue() override calls super().enqueue() and, on queue-full, also writes "failed" to the DB (existing tests assert this side effect)
  • _build_config() reads VRAM overrides from config/llm.yaml as before
  • Re-exports get_scheduler, reset_scheduler so call sites are unchanged
  • Also: conda env renamed job-seekercf in environment.yml, manage.sh; README improvements

⚠️ Depends on Circuit-Forge/circuitforge-core#2 (shared task scheduler) — install circuitforge-core[tasks] before running.

Test plan

  • conda run -n cf pytest tests/ -v — all existing scheduler tests pass with shim
  • Enqueue-when-full path still writes status=failed to DB
  • get_scheduler() singleton works across imports
## Summary - Replaces `scripts/task_scheduler.py` full implementation with a thin shim over `circuitforge_core.tasks.scheduler` - `TaskScheduler` subclasses `_CoreTaskScheduler` to preserve backward-compat: `enqueue()` override calls `super().enqueue()` and, on queue-full, also writes `"failed"` to the DB (existing tests assert this side effect) - `_build_config()` reads VRAM overrides from `config/llm.yaml` as before - Re-exports `get_scheduler`, `reset_scheduler` so call sites are unchanged - Also: conda env renamed `job-seeker` → `cf` in `environment.yml`, `manage.sh`; README improvements > ⚠️ **Depends on Circuit-Forge/circuitforge-core#2** (shared task scheduler) — install `circuitforge-core[tasks]` before running. ## Test plan - [ ] `conda run -n cf pytest tests/ -v` — all existing scheduler tests pass with shim - [ ] Enqueue-when-full path still writes `status=failed` to DB - [ ] `get_scheduler()` singleton works across imports
pyr0ball added 2 commits 2026-03-31 10:42:56 -07:00
VRAM detection now uses cf-orch free VRAM when coordinator is running,
making the scheduler cooperative with other cf-orch consumers.
Enqueue return value now checked — queue-full tasks are marked failed.
chore: rename conda env job-seeker to cf; update README
Some checks failed
CI / test (pull_request) Failing after 22s
15dc4b2646
Some checks failed
CI / test (pull_request) Failing after 22s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/shared-task-scheduler:feature/shared-task-scheduler
git checkout feature/shared-task-scheduler

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff feature/shared-task-scheduler
git checkout feature/shared-task-scheduler
git rebase main
git checkout main
git merge --ff-only feature/shared-task-scheduler
git checkout feature/shared-task-scheduler
git rebase main
git checkout main
git merge --no-ff feature/shared-task-scheduler
git checkout main
git merge --squash feature/shared-task-scheduler
git checkout main
git merge --ff-only feature/shared-task-scheduler
git checkout main
git merge feature/shared-task-scheduler
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#47
No description provided.