File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env python
22# ==============================================================================
33# Copyright 2014 Intel Corporation
4+ # Copyright 2024 Fujitsu Limited
45#
56# Licensed under the Apache License, Version 2.0 (the "License");
67# you may not use this file except in compliance with the License.
7273ONEDAL_2021_3 = 2021 * 10000 + 3 * 100
7374ONEDAL_2023_0_1 = 2023 * 10000 + 0 * 100 + 1
7475is_onedal_iface = (
75- os .environ .get ("OFF_ONEDAL_IFACE" ) is None and ONEDAL_VERSION >= ONEDAL_2021_3
76+ os .environ .get ("OFF_ONEDAL_IFACE" , "0" ) == "0" and ONEDAL_VERSION >= ONEDAL_2021_3
7677)
7778
7879d4p_version = (
Original file line number Diff line number Diff line change 11# ==============================================================================
22# Copyright 2021 Intel Corporation
3+ # Copyright 2024 Fujitsu Limited
34#
45# Licensed under the Apache License, Version 2.0 (the "License");
56# you may not use this file except in compliance with the License.
1415# limitations under the License.
1516# ==============================================================================
1617
17- from onedal . common . hyperparameters import get_hyperparameters
18+ import os
1819
1920from . import utils
2021from ._config import config_context , get_config , set_config
5051 "unpatch_sklearn" ,
5152 "utils" ,
5253]
54+ onedal_iface_flag = os .environ .get ("OFF_ONEDAL_IFACE" , "0" )
55+ if onedal_iface_flag == "0" :
56+ from onedal import _is_spmd_backend
57+ from onedal .common .hyperparameters import get_hyperparameters
5358
54-
55- from onedal import _is_spmd_backend
56-
57- if _is_spmd_backend :
58- __all__ .append ("spmd" )
59+ if _is_spmd_backend :
60+ __all__ .append ("spmd" )
5961
6062
6163from ._utils import set_sklearn_ex_verbose
Original file line number Diff line number Diff line change 11# ==============================================================================
22# Copyright 2021 Intel Corporation
3+ # Copyright 2024 Fujitsu Limited
34#
45# Licensed under the Apache License, Version 2.0 (the "License");
56# you may not use this file except in compliance with the License.
2223
2324
2425def _is_new_patching_available ():
25- return os .environ .get ("OFF_ONEDAL_IFACE" ) is None and daal_check_version (
26+ return os .environ .get ("OFF_ONEDAL_IFACE" , "0" ) == "0" and daal_check_version (
2627 (2021 , "P" , 300 )
2728 )
2829
You can’t perform that action at this time.
0 commit comments