Skip to content

auto-select fallback to automlx for fast approximate mode #1133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ads/opctl/operator/lowcode/forecast/model/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/

from ..const import AUTO_SELECT, SupportedModels
from ..const import AUTO_SELECT, SpeedAccuracyMode, SupportedModels
from ..model_evaluator import ModelEvaluator
from ..operator_config import ForecastOperatorConfig
from .arima import ArimaOperatorModel
Expand Down Expand Up @@ -66,6 +66,13 @@ def get_model(
if model_type == AUTO_SELECT:
model_type = cls.auto_select_model(datasets, operator_config)
operator_config.spec.model_kwargs = {}
# set the explanations accuracy mode to AUTOMLX if the selected model is automlx
if (
model_type == SupportedModels.AutoMLX
and operator_config.spec.explanations_accuracy_mode
== SpeedAccuracyMode.FAST_APPROXIMATE
):
operator_config.spec.explanations_accuracy_mode = SpeedAccuracyMode.AUTOMLX
if model_type not in cls._MAP:
raise UnSupportedModelError(model_type)
return cls._MAP[model_type](config=operator_config, datasets=datasets)
Expand Down
Loading