Skip to content

Commit be14d7e

Browse files
authored
auto-select fallback to automlx for fast approximate mode (#1133)
2 parents 04808f7 + d1bda3e commit be14d7e

File tree

1 file changed

+8
-1
lines changed
  • ads/opctl/operator/lowcode/forecast/model

1 file changed

+8
-1
lines changed

ads/opctl/operator/lowcode/forecast/model/factory.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
44
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
55

6-
from ..const import AUTO_SELECT, SupportedModels
6+
from ..const import AUTO_SELECT, SpeedAccuracyMode, SupportedModels
77
from ..model_evaluator import ModelEvaluator
88
from ..operator_config import ForecastOperatorConfig
99
from .arima import ArimaOperatorModel
@@ -66,6 +66,13 @@ def get_model(
6666
if model_type == AUTO_SELECT:
6767
model_type = cls.auto_select_model(datasets, operator_config)
6868
operator_config.spec.model_kwargs = {}
69+
# set the explanations accuracy mode to AUTOMLX if the selected model is automlx
70+
if (
71+
model_type == SupportedModels.AutoMLX
72+
and operator_config.spec.explanations_accuracy_mode
73+
== SpeedAccuracyMode.FAST_APPROXIMATE
74+
):
75+
operator_config.spec.explanations_accuracy_mode = SpeedAccuracyMode.AUTOMLX
6976
if model_type not in cls._MAP:
7077
raise UnSupportedModelError(model_type)
7178
return cls._MAP[model_type](config=operator_config, datasets=datasets)

0 commit comments

Comments
 (0)