Skip to content

Som/424394/Add chronos2 as Model in Finn#202

Open
smdp2000ofc wants to merge 9 commits intomainfrom
som/chronos-init
Open

Som/424394/Add chronos2 as Model in Finn#202
smdp2000ofc wants to merge 9 commits intomainfrom
som/chronos-init

Conversation

@smdp2000ofc
Copy link
Collaborator

@smdp2000ofc smdp2000ofc commented Feb 17, 2026

This pull request add Chronos2 by Amazon. It relies on azure self-deployed ML online endpoint

Key Notes for Reviewers

chronos2_model.R and chronos_controller.R :
The core Chronos2 model configuration lives in chronos2_model.R. It leverages chronos_controller.R to send POST requests to the Azure-deployed endpoint. The controller converts the input data frame into the required JSON schema and transforms the API response back into a data frame, where the predictions column contains the forecast values.
The controller is designed to be reusable for chronos-bolt-base and chronos-bolt-tiny as well, since they share the same interface and differ mainly via model_type.

API Configuration :
FinnTS users can configure Chronos2 via:
CHRONOS_API_URL
CHRONOS_API_TOKEN

packages added - jsonlite and httr

train_models.R and models.R :
For Chronos2, differencing is skipped. A new “foundational model” list is introduced so additional models can be added cleanly; Chronos2 and TimeGPT are included in this list.

NEWS.MD, DESCRIPTION.MD and vignettes/forecasting-genai.Rmd
Documentation is updated to include Chronos2 in the “forecasting with genai” vignette, along with release notes in NEWS.MD.

Future Iterations
Add into agent flow.

@smdp2000ofc smdp2000ofc changed the title WIP - Som/Add chronos2 as Model in Finn Som/424394/Add chronos2 as Model in Finn Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for Amazon’s Chronos2 as a new “foundation model” in finnts, integrating it as a custom parsnip model that calls an Azure-hosted online endpoint for inference.

Changes:

  • Added a Chronos2 parsnip model spec + controller to format payloads, call the Azure endpoint, and parse responses.
  • Updated training pipeline logic to treat “foundation models” (Chronos2 + TimeGPT) differently for feature selection and stationarity handling.
  • Added documentation (vignettes, NEWS) and CI/test scaffolding for Chronos2.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
R/chronos2_model.R Adds Chronos2 parsnip model, predict/fit bridge, and padding helper.
R/chronos_controller.R Implements request payload building, env var handling, and response parsing for Chronos API calls.
R/models.R Registers chronos2 in model lists and adds list_foundation_models().
R/train_models.R Adjusts feature selection + differencing logic to account for foundation models.
R/utility.R Registers make_chronos2_model() on package load.
tests/testthat/test-chronos.R Adds unit + integration tests for Chronos2 and the controller.
vignettes/forecasting-genai.Rmd Expands GenAI vignette to include Chronos2 usage and setup.
vignettes/models-used-in-finnts.Rmd Adds Chronos2 to the models listing vignette.
NEWS.md Adds release notes for Chronos2 integration.
DESCRIPTION Adds httr/jsonlite to Imports.
NAMESPACE Exports Chronos2 functions and registers S3 methods.
.github/workflows/R-CMD-check.yaml Adds Chronos endpoint secrets to CI environment.
man/*.Rd Adds roxygen-generated docs for Chronos2 functions/methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants