From 6bafe9f80adcf826cff98e57efe13d67841192f3 Mon Sep 17 00:00:00 2001 From: weijingchen Date: Thu, 14 Dec 2023 17:50:39 +0800 Subject: [PATCH] Signed-off-by: weijingchen remove example Signed-off-by: cwj --- .../test_hetero_sbt_multi_with_predict.py | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 examples/pipeline/hetero_secureboost/test_hetero_sbt_multi_with_predict.py diff --git a/examples/pipeline/hetero_secureboost/test_hetero_sbt_multi_with_predict.py b/examples/pipeline/hetero_secureboost/test_hetero_sbt_multi_with_predict.py deleted file mode 100644 index 52cc6ab19b..0000000000 --- a/examples/pipeline/hetero_secureboost/test_hetero_sbt_multi_with_predict.py +++ /dev/null @@ -1,52 +0,0 @@ -import argparse -from fate_client.pipeline.components.fate import HeteroSecureBoost, PSI, Evaluation -from fate_client.pipeline import FateFlowPipeline -from fate_client.pipeline.interface import DataWarehouseChannel -from fate_client.pipeline.utils import test_utils - - -def main(config="../config.yaml", namespace=""): - if isinstance(config, str): - config = test_utils.load_job_config(config) - parties = config.parties - guest = parties.guest[0] - host = parties.host[0] - arbiter = parties.arbiter[0] - - pipeline = FateFlowPipeline().set_parties(guest=guest, host=host, arbiter=arbiter) - - psi_0 = PSI("psi_0") - psi_0.guest.task_setting(input_data=DataWarehouseChannel(name="vehicle_scale_hetero_guest", - namespace="experiment")) - psi_0.hosts[0].task_setting(input_data=DataWarehouseChannel(name="vehicle_scale_hetero_host", - namespace="experiment")) - - hetero_sbt_0 = HeteroSecureBoost('sbt_0', num_trees=3, max_bin=32, max_depth=3, objective='multi:ce', num_class=4, - he_param={'kind': 'paillier', 'key_length': 1024}, train_data=psi_0.outputs['output_data'],) - - hetero_sbt_1 = HeteroSecureBoost('sbt_1', test_data=psi_0.outputs['output_data'], - predict_model_input=hetero_sbt_0.outputs['train_model_output']) - - evaluation_0 = Evaluation( - 'eval_0', - runtime_roles=['guest'], - default_eval_setting='multi', - input_data=[hetero_sbt_0.outputs['train_data_output']] - ) - - pipeline.add_task(psi_0) - pipeline.add_task(hetero_sbt_0) - pipeline.add_task(hetero_sbt_1) - pipeline.add_task(evaluation_0) - pipeline.compile() - pipeline.fit() - - -if __name__ == "__main__": - parser = argparse.ArgumentParser("PIPELINE DEMO") - parser.add_argument("--config", type=str, default="../config.yaml", - help="config file") - parser.add_argument("--namespace", type=str, default="", - help="namespace for data stored in FATE") - args = parser.parse_args() - main(config=args.config, namespace=args.namespace) \ No newline at end of file