def _helper_onnx_inference(
        self,
        model,
        onnx_filename: str,
        series: TimeSeries,
        past_covariates: Optional[TimeSeries],
        future_covariates: Optional[TimeSeries],
    ):
        """Darts model is only used to detect which covariates are supported by the weights."""
        ort_session = ort.InferenceSession(onnx_filename)

        # extract the input arrays from the series
        past_feats, future_feats, static_feats = prepare_onnx_inputs(
            model=model,
            series=series,
            past_covariates=past_covariates,
            future_covariates=future_covariates,
        )

        # extract only the features expected by the model
        ort_inputs = {}
        for name, arr in zip(
            ["x_past", "x_future", "x_static"], [past_feats, future_feats, static_feats]
        ):
            if name in [inp.name for inp in list(ort_session.get_inputs())]:
                ort_inputs[name] = arr

        # output has shape (batch, output_chunk_length, n components, 1 or n likelihood params)
        return ort_session.run(None, ort_inputs)
Darts model is only used to detect which covariates are supported by the weights.
darts/tests/optional_deps/test_onnx.py