Support pluggable backends for foundation models

Open
#1,176 0 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@LuYuan-Zjyy is already working on this.

Since Nov 6, 2026.

  • #1180 by @LuYuan-Zjyy — open

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
58/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start with the ForecastingWorkflowConfig preset in packages/openstef-foundation-models/src/openstef_foundation_models/presets/forecasting_workflow.py, where the backend is hardcoded to the ONNX runtime, then read the InferenceBackend base class in inference/backend.py. Widen the accepted type so any InferenceBackend implementation validates, keeping the ONNX backend as the default. Done when a custom backend passes config validation and existing ONNX-based workflow tests still pass.

Written by the indexing model from the issue text.

Description

enhancement

Is your feature request related to a problem?

Not a problem, but rather a limitation in one of the extension points: using different backends for foundation models.

At the moment the ForecastingWorfklowConfig preset is hardcoded to use the local ONNX runtime backend.

Trying to plug another backend (another implementation of the InferenceBackend for e.g. KServe) leads to a Pydantic validation error.

Describe the solution you'd like

Relax the types accepted by ForecastingWorfklowConfig such that any implementation of the InferenceBackend class is valid.

Keep the local ONNX runtime as the default backend used when not overriden.

Describe alternatives you've considered

Writing another implementation of BaseConfig to replace ForecastingWorkflowConfig in client code, but most of the code would be the upstream copy-pasted with the only difference being the solution suggested above.

Affected package(s)

  • openstef-core
  • openstef-models
  • openstef-beam
  • openstef-foundation-models
  • openstef-meta
  • examples / deployment
  • docs
  • not sure

Would this require breaking changes to the public API?

  • No
  • Yes
  • Not sure

Additional context

I am willing to contribute a PR to close this issue.

Dominant language
Python
Stars
169
Forks
59
Avg merge
4d 15h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenSTEF/openstef

All issues in OpenSTEF/openstef

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.