From 3de18254c59153dfe8b81b77f2c6370e00f68d09 Mon Sep 17 00:00:00 2001 From: sagewe Date: Sat, 9 Dec 2023 19:07:23 +0800 Subject: [PATCH] fix computing and federation import for tests Signed-off-by: sagewe --- python/fate/ml/aggregator/test/test_aggregator.py | 4 ++-- python/fate/ml/aggregator/test/test_fate_utils.py | 4 ++-- python/fate/ml/ensemble/algo/secureboost/test/test_goss.py | 4 ++-- .../ensemble/algo/secureboost/test/test_hetero_sbt_binary.py | 4 ++-- .../secureboost/test/test_hetero_sbt_binary_multi_host.py | 4 ++-- .../algo/secureboost/test/test_hetero_sbt_binary_with_goss.py | 4 ++-- .../ensemble/algo/secureboost/test/test_hetero_sbt_multi.py | 4 ++-- .../algo/secureboost/test/test_hetero_sbt_regression.py | 4 ++-- .../ensemble/learner/decision_tree/test/test_decision_tree.py | 4 ++-- .../learner/decision_tree/test/test_local_decision_tree.py | 4 ++-- .../learner/decision_tree/tree_core/test/test_loss.py | 4 ++-- python/fate/ml/glm/homo/lr/test/test_fed_lr.py | 4 ++-- python/fate/ml/glm/homo/lr/test/test_local.py | 4 ++-- python/fate/ml/nn/test/test_agglayer.py | 4 ++-- python/fate/ml/nn/test/test_fedpass_alexnet.py | 2 +- python/fate/ml/nn/test/test_fedpass_lenet.py | 4 ++-- python/fate/ml/nn/test/test_fedpass_tabular.py | 4 ++-- python/fate/ml/nn/test/test_hetero_nn_algo.py | 4 ++-- python/fate/ml/nn/test/test_hetero_nn_algo_no_guest.py | 4 ++-- python/fate/ml/nn/test/test_hetero_nn_algo_val.py | 4 ++-- python/fate/ml/nn/test/test_homo_nn_binary.py | 4 ++-- python/fate/ml/utils/test/test_predict_format.py | 4 ++-- python/fate/test/test_dtensor.py | 4 ++-- python/fate/test/test_matmul.py | 4 ++-- 24 files changed, 47 insertions(+), 47 deletions(-) diff --git a/python/fate/ml/aggregator/test/test_aggregator.py b/python/fate/ml/aggregator/test/test_aggregator.py index ba74c743c6..4048f92620 100644 --- a/python/fate/ml/aggregator/test/test_aggregator.py +++ b/python/fate/ml/aggregator/test/test_aggregator.py @@ -10,8 +10,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) diff --git a/python/fate/ml/aggregator/test/test_fate_utils.py b/python/fate/ml/aggregator/test/test_fate_utils.py index 51ddd34311..2fc1ccade4 100644 --- a/python/fate/ml/aggregator/test/test_fate_utils.py +++ b/python/fate/ml/aggregator/test/test_fate_utils.py @@ -8,8 +8,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) diff --git a/python/fate/ml/ensemble/algo/secureboost/test/test_goss.py b/python/fate/ml/ensemble/algo/secureboost/test/test_goss.py index 4e1172b913..4b4451180c 100644 --- a/python/fate/ml/ensemble/algo/secureboost/test/test_goss.py +++ b/python/fate/ml/ensemble/algo/secureboost/test/test_goss.py @@ -15,8 +15,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary.py b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary.py index efc311fbf9..3ca1dc525c 100644 --- a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary.py +++ b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary.py @@ -15,8 +15,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_multi_host.py b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_multi_host.py index d364c49c40..fb2c3c5bfb 100644 --- a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_multi_host.py +++ b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_multi_host.py @@ -17,8 +17,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_with_goss.py b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_with_goss.py index b371f419ed..aef5df671d 100644 --- a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_with_goss.py +++ b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_binary_with_goss.py @@ -16,8 +16,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_multi.py b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_multi.py index da1edb4cc6..39c13313f8 100644 --- a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_multi.py +++ b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_multi.py @@ -19,8 +19,8 @@ def get_current_datetime_str(): def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() diff --git a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_regression.py b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_regression.py index 1c9feec29e..5bd665d861 100644 --- a/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_regression.py +++ b/python/fate/ml/ensemble/algo/secureboost/test/test_hetero_sbt_regression.py @@ -19,8 +19,8 @@ def get_current_datetime_str(): def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() diff --git a/python/fate/ml/ensemble/learner/decision_tree/test/test_decision_tree.py b/python/fate/ml/ensemble/learner/decision_tree/test/test_decision_tree.py index 941a70341b..ffb75c1036 100644 --- a/python/fate/ml/ensemble/learner/decision_tree/test/test_decision_tree.py +++ b/python/fate/ml/ensemble/learner/decision_tree/test/test_decision_tree.py @@ -16,8 +16,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() diff --git a/python/fate/ml/ensemble/learner/decision_tree/test/test_local_decision_tree.py b/python/fate/ml/ensemble/learner/decision_tree/test/test_local_decision_tree.py index 2dbadeb393..fa8014f103 100644 --- a/python/fate/ml/ensemble/learner/decision_tree/test/test_local_decision_tree.py +++ b/python/fate/ml/ensemble/learner/decision_tree/test/test_local_decision_tree.py @@ -14,8 +14,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() diff --git a/python/fate/ml/ensemble/learner/decision_tree/tree_core/test/test_loss.py b/python/fate/ml/ensemble/learner/decision_tree/tree_core/test/test_loss.py index ee34552976..7f1f602783 100644 --- a/python/fate/ml/ensemble/learner/decision_tree/tree_core/test/test_loss.py +++ b/python/fate/ml/ensemble/learner/decision_tree/tree_core/test/test_loss.py @@ -21,8 +21,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() diff --git a/python/fate/ml/glm/homo/lr/test/test_fed_lr.py b/python/fate/ml/glm/homo/lr/test/test_fed_lr.py index 581ecff9a1..00e03b4440 100644 --- a/python/fate/ml/glm/homo/lr/test/test_fed_lr.py +++ b/python/fate/ml/glm/homo/lr/test/test_fed_lr.py @@ -13,8 +13,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) diff --git a/python/fate/ml/glm/homo/lr/test/test_local.py b/python/fate/ml/glm/homo/lr/test/test_local.py index 70a60d576e..c6f5fb0d3a 100644 --- a/python/fate/ml/glm/homo/lr/test/test_local.py +++ b/python/fate/ml/glm/homo/lr/test/test_local.py @@ -1,7 +1,7 @@ from fate.arch import Context -from fate.arch.computing.standalone import CSession +from fate.arch.computing.backends.standalone import CSession from fate.arch.context import Context -from fate.arch.federation.standalone import StandaloneFederation +from fate.arch.federation.backends.standalone import StandaloneFederation import pandas as pd from fate.arch.dataframe import PandasReader from fate.ml.nn.dataset.table import TableDataset diff --git a/python/fate/ml/nn/test/test_agglayer.py b/python/fate/ml/nn/test/test_agglayer.py index 4d2ec2a4d2..5d97996839 100644 --- a/python/fate/ml/nn/test/test_agglayer.py +++ b/python/fate/ml/nn/test/test_agglayer.py @@ -14,8 +14,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/nn/test/test_fedpass_alexnet.py b/python/fate/ml/nn/test/test_fedpass_alexnet.py index 68ac4b58ac..bf9287676e 100644 --- a/python/fate/ml/nn/test/test_fedpass_alexnet.py +++ b/python/fate/ml/nn/test/test_fedpass_alexnet.py @@ -25,7 +25,7 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession + from fate.arch.computing.backends.standalone import CSession from fate.arch.federation.standalone import StandaloneFederation import logging diff --git a/python/fate/ml/nn/test/test_fedpass_lenet.py b/python/fate/ml/nn/test/test_fedpass_lenet.py index 3e35924164..f11bbc8148 100644 --- a/python/fate/ml/nn/test/test_fedpass_lenet.py +++ b/python/fate/ml/nn/test/test_fedpass_lenet.py @@ -24,8 +24,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/nn/test/test_fedpass_tabular.py b/python/fate/ml/nn/test/test_fedpass_tabular.py index db2b3cca54..416da6e21c 100644 --- a/python/fate/ml/nn/test/test_fedpass_tabular.py +++ b/python/fate/ml/nn/test/test_fedpass_tabular.py @@ -16,8 +16,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/nn/test/test_hetero_nn_algo.py b/python/fate/ml/nn/test/test_hetero_nn_algo.py index 1c27774f49..bcdc891278 100644 --- a/python/fate/ml/nn/test/test_hetero_nn_algo.py +++ b/python/fate/ml/nn/test/test_hetero_nn_algo.py @@ -17,8 +17,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/nn/test/test_hetero_nn_algo_no_guest.py b/python/fate/ml/nn/test/test_hetero_nn_algo_no_guest.py index 56c27196f1..9dadd73cb6 100644 --- a/python/fate/ml/nn/test/test_hetero_nn_algo_no_guest.py +++ b/python/fate/ml/nn/test/test_hetero_nn_algo_no_guest.py @@ -17,8 +17,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/nn/test/test_hetero_nn_algo_val.py b/python/fate/ml/nn/test/test_hetero_nn_algo_val.py index b86e198b10..b246d90a38 100644 --- a/python/fate/ml/nn/test/test_hetero_nn_algo_val.py +++ b/python/fate/ml/nn/test/test_hetero_nn_algo_val.py @@ -17,8 +17,8 @@ def get_current_datetime_str(): def create_ctx(local, context_name): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging # prepare log diff --git a/python/fate/ml/nn/test/test_homo_nn_binary.py b/python/fate/ml/nn/test/test_homo_nn_binary.py index 94385c3b8b..ce73fc3b4a 100644 --- a/python/fate/ml/nn/test/test_homo_nn_binary.py +++ b/python/fate/ml/nn/test/test_homo_nn_binary.py @@ -12,8 +12,8 @@ def create_ctx(local): from fate.arch import Context - from fate.arch.computing.standalone import CSession - from fate.arch.federation.standalone import StandaloneFederation + from fate.arch.computing.backends.standalone import CSession + from fate.arch.federation.backends.standalone import StandaloneFederation import logging logger = logging.getLogger() diff --git a/python/fate/ml/utils/test/test_predict_format.py b/python/fate/ml/utils/test/test_predict_format.py index 8281388ad2..a6a1d8a3b4 100644 --- a/python/fate/ml/utils/test/test_predict_format.py +++ b/python/fate/ml/utils/test/test_predict_format.py @@ -1,7 +1,7 @@ from fate.arch import Context -from fate.arch.computing.standalone import CSession +from fate.arch.computing.backends.standalone import CSession from fate.arch.context import Context -from fate.arch.federation.standalone import StandaloneFederation +from fate.arch.federation.backends.standalone import StandaloneFederation import pandas as pd from fate.ml.utils.predict_tools import compute_predict_details, PREDICT_SCORE, LABEL, BINARY, REGRESSION, MULTI from fate.arch.dataframe import PandasReader diff --git a/python/fate/test/test_dtensor.py b/python/fate/test/test_dtensor.py index d83d7ff802..acf502e83e 100644 --- a/python/fate/test/test_dtensor.py +++ b/python/fate/test/test_dtensor.py @@ -1,8 +1,8 @@ import pytest import torch from fate.arch import Context -from fate.arch.computing.standalone import CSession -from fate.arch.federation.standalone import StandaloneFederation +from fate.arch.computing.backends.standalone import CSession +from fate.arch.federation.backends.standalone import StandaloneFederation from fate.arch.tensor import DTensor from pytest import fixture diff --git a/python/fate/test/test_matmul.py b/python/fate/test/test_matmul.py index 319086c8fb..60bef1b89c 100644 --- a/python/fate/test/test_matmul.py +++ b/python/fate/test/test_matmul.py @@ -1,7 +1,7 @@ import torch -from fate.arch.computing.standalone import CSession +from fate.arch.computing.backends.standalone import CSession from fate.arch.context import Context -from fate.arch.federation.standalone import StandaloneFederation +from fate.arch.federation.backends.standalone import StandaloneFederation from fate.arch.tensor import DTensor from pytest import fixture