runtime: share forecast families' wiring, Chronos-Bolt the only one #682
Labels
Clear labels
accessibility
all-platforms
area:agents
area:ai
area:chain
area:ci
area:client
area:daemon
area:p2p
area:project
area:protocol
area:runtime
area:storage
bug
chore
community
dependencies
discussion
discussion/Announcements
discussion/General
discussion/Ideas
discussion/Q&A
discussion/Show and tell
discussion/answered
documentation
duplicate
enhancement
good first issue
help wanted
i18n
infra
invalid
needs:decision
needs:hardware
paired
question
research
security
status:in-review
test
testing
tracking
wontfix
Barrier affecting people with disabilities
Run every platform's packaging and checks on this pull request, not only the three main ones
MCP server, skill, and thinking on the pool
Planner and model providers
Blockchain, SISY, verification
Continuous integration and build workflows
Desktop and web clients
sisyphusd coordinator, worker, scheduler
libp2p hosts, relays, discovery, connections between nodes
Project planning, roadmap, and governance
Protobuf schemas and RPC contracts
Workload execution and environments
Content-addressed storage, IPFS, Kubo, Cluster, S3, names, pinning
Something isn't working
Repository health, templates, Discussions, contributor experience
Updates to actions, Go modules or npm packages
Migrated from GitHub Discussions
GitHub Discussions category: Announcements
GitHub Discussions category: General
GitHub Discussions category: Ideas
GitHub Discussions category: Q&A
GitHub Discussions category: Show and tell
Q&A discussion with an accepted answer
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
Translations and right-to-left layouts
Build, CI, releases
This doesn't seem right
Waits on a decision from both owners
Waits on a machine we do not have yet
Built together by both maintainers, with co-authored commits
Further information is requested
Needs investigation or a design decision
Sealing, keys, access control, tokens, the security model
Built and in an open pull request; closes when it merges
Tests, test harnesses and the rehearsal
Roadmap and meta issues
This will not be worked on
type
Feature
A request, idea, or new functionality (GitHub issue type)
type
Task
A specific piece of work (GitHub issue type)
Milestone
No items
No Milestone
Real workloads
Projects
Clear projects
No projects
Sisyphus roadmap
Done
No Assignees
rvnminers-A-and-N
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Sisyphus/Sisyphus#682
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This is the refactor Lior proposed on #665 (comment): each family keeps its implementation in its own file, there is a small shared descriptor, and a registry the common forecasting code iterates. Chronos-Bolt is the only entry and nothing changes for it. TimesFM is not part of this PR.
Shared (
packages/runtime/forecast_family.go):Compareforforecastandforecasts, andcompareWithin).In
forecast.goandforecasts.go, a model's settings check, its fewest points, the candidate list, the task'sScale, per-task sizing andkeptCandidatesnow ask the registry instead of checking for"chronos".Descriptor:
forecastFamilyhas these fields:kind,name,variants,fewest,memoryMB,tolerance,labelandrunner. Memory and tolerance are fields because both mean the same thing for any family: the container's memory, and the agreement relative to the series' size.Per family (
packages/runtime/chronos.go): the pins, requirements, fetch script, Dockerfile,ChronosImage/ChronosLabel, the script the image runs, what it's given (chronosAsked) and what it leaves, and the checks on that output, all insidechronosRunner. The file also holds thechronosFamilyentry.Unchanged
The image is still
sisyphus-chronos:e5a1c8b7a87band the labelforecast-chronos:e5a1c8b7a87b. On the R620, the real-image test reused that existing image without rebuilding it.Before changing anything, I recorded 69 values with the pretend Chronos image for
forecastandforecastsjobs ofnaive,chronos-tiny,all,chronos-base,chronos-mini,chronos-smallandnaive,ses:Needs,Offers, the form's choices and help;kinds()andinvalid()/fewest()results.The same recording after the refactor is byte-identical. It was a throwaway test and isn't committed.
The 40-series byte-for-byte comparison is now a committed test,
TestChronosWiringGivesTheKnownAnswer. Behind #666 it was only a local check, though Lior asked for it as a regression test. It hashes:forecastsof 40 series, from too short to backtest up, andforecastof one series;all,chronos-base;Needs,Offers, the form, the refusals,kinds(),invalid()/fewest(), and the image name and label.The same test file gives the same digest (
a9a8b02e…) on dev at8b83c49, before this refactor. Changing the batch size the image is given makes it fail.The rest of the existing tests are unchanged, except two renamed references in
chronos_test.go, plus a new check that the pins and the offered sizes match one for one.New tests (
forecast_family_test.go)keptCandidates.Docs
docs/forecast-benchmark.md, Chronos-Bolt section: a new bullet on the family split and where a second family would go.docs/security-model.md: now points toCompareinforecast_family.go.Checks run
go test ./packages/... ./apps/sisyphusd/...go test -tags realimages -run TestChronosForecastsARealSeriesInItsImage ./packages/runtime/against the real imagePart of #665.
The family registry keeps the shared dispatch and comparison path centralized while leaving Chronos-specific image and output behavior in its own file. The pinned regression test makes the behavior-preserving boundary concrete, and the second-family test exercises the generic path. All required checks are green, including coverage, realimages, the platform matrix, and desktop packaging. /cc @rvnminers-A-and-N
Thanks for the review, Lior. It's merged as
012c4f6, and integration is synced.TimesFM is next, as a family of its own. Before any code, I'll check its license, memory footprint and determinism, and post those on #665.