Skip to content

Commit

Permalink
fix computing and federation import for tests
Browse files Browse the repository at this point in the history
Signed-off-by: sagewe <wbwmat@gmail.com>
  • Loading branch information
sagewe committed Dec 11, 2023
1 parent a1d55ba commit 3de1825
Show file tree
Hide file tree
Showing 24 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions python/fate/ml/aggregator/test/test_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/aggregator/test/test_fate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/ensemble/algo/secureboost/test/test_goss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/glm/homo/lr/test/test_fed_lr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/glm/homo/lr/test/test_local.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_agglayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/fate/ml/nn/test/test_fedpass_alexnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_fedpass_lenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_fedpass_tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_hetero_nn_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_hetero_nn_algo_no_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_hetero_nn_algo_val.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/nn/test/test_homo_nn_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions python/fate/ml/utils/test/test_predict_format.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/fate/test/test_dtensor.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions python/fate/test/test_matmul.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 3de1825

Please sign in to comment.