Repository navigation
Add ci-proto foundation model adapter - #1
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
CIprotoAdapterforContinuousIntelligence/ci-protothroughcontinuousintelligence>=0.2.0, supporting a context window of up to 2 million observations and automatic selection between variants tuned for shorter and longer histories.The adapter retains all supplied history by default (
context_length=None). The backend's 16,384-observation threshold selects the tuned variant; it does not crop history. Shared foundation preprocessing, metadata and backtesting now accept unlimited history, while explicit positive context limits keep their existing behavior.Support includes numeric, boolean, nullable and categorical past-only and known-future covariates, native quantile selection, lazy model loading, CPU/CUDA placement and Hub revision pinning. Each target is forecast independently, following the existing foundation adapter conventions. Capability and licence metadata, the user guide, release note, generated references and registration in the shared backend compatibility suite are included.
Unit tests use the existing shared lightweight Torch fixtures, while the shared backend compatibility suite exercises the real package and published weights. This avoids a macOS hang in the recording backend when copying the two-million-observation test context with a real PyTorch tensor. All history and covariate assertions are retained.
Validation
FoundationModel, without supplyingmodel=, passed on two complete FEV tasks and exactly matched the injected-backend scores.Validation environment: Python 3.13.14,
continuousintelligence0.2.0, torch 2.14.1+cu130, numpy 2.5.5, pandas 2.3.3, scikit-learn 1.9.1, pytest 9.2.0, NVIDIA H100 80GB. Published-weight smoke tests also passed on the GitHub Ubuntu CPU runner with torch 2.15.0+cpu. The FEV reference was pinned to Hub revision350720e2dae262610ec6abb541177987d26f3347and uses the nine-quantile export rather than the historical 99-head checkpoint.The full 15-job unit-test matrix (Python 3.10 through 3.14 on Linux, macOS and Windows), minimum-dependency checks, and backend compatibility checks passed. The existing parallel Bayesian-search warning test needed one retry on Linux 3.13 and minimum dependencies; an isolated reproduction of the unchanged test body and fixture against the unchanged base commit also failed. Codecov uploads are the only remaining failed check and require a token configured for this fork.