Skip to content

[AINode]: Integrate toto as a builtin forecasting model#17322

Open
graceli02 wants to merge 2 commits intoapache:masterfrom
graceli02:toto-ainode-integration
Open

[AINode]: Integrate toto as a builtin forecasting model#17322
graceli02 wants to merge 2 commits intoapache:masterfrom
graceli02:toto-ainode-integration

Conversation

@graceli02
Copy link

@graceli02 graceli02 commented Mar 20, 2026

Description

Integrate Datadog Toto model into AINode as a built-in forecast model.

What changed

  • Added Toto model registration to built-in model map (model_id=toto, repo_id=Datadog/Toto-Open-Base-1.0).
  • Added Toto-specific loading path in model_loader.py:
    • Load from local built-in model directory via Toto.from_pretrained(...)
    • Wrap with TotoForecaster for inference pipeline usage.
  • Added TotoPipeline for AINode forecast flow:
    • Convert IoTDB targets into Toto MaskedTimeseries.
    • Run Toto forecasting and normalize output to 2D tensors expected by AINode postprocess.
  • Vendored Toto runtime source files under iotdb/ainode/core/model/toto/.
  • Added required dependencies:
    • gluonts[torch]
    • rotary-embedding-torch
  • Added verification assets:
    • verify_toto.py (end-to-end local smoke script)
    • tests/test_toto_pipeline.py (lightweight unit tests with fake forecaster)

Notes

  • Toto integration uses a dedicated loader path instead of Transformers auto_map.
  • Output shape handling in Toto pipeline was adjusted to satisfy AINode ForecastPipeline.postprocess contract (2D per batch item).

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@graceli02 graceli02 changed the title feat(ainode): Integrate toto as a builtin forecast model [AINode]: Integrate toto as a builtin forecast model Mar 20, 2026
@graceli02 graceli02 changed the title [AINode]: Integrate toto as a builtin forecast model [AINode]: Integrate toto as a builtin forecasting model Mar 20, 2026
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