diff --git a/.gitmodules b/.gitmodules index 3e981458c8..7c5136526a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,7 +5,7 @@ [submodule "eggroll"] path = eggroll url = https://github.com/WeBankFinTech/eggroll.git - branch = v2.5.2 + branch = v2.5.3 [submodule "fateflow"] path = fateflow url = https://github.com/FederatedAI/FATE-Flow.git diff --git a/RELEASE.md b/RELEASE.md index fd0b24b247..f2194aec3b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,12 @@ +## Release 1.11.4 +### Major Features and Improvements +> FederatedML +* Unified key length configuration of encryption algorithm, update default key length to 2048. + +> Bug-Fix +* Modify hessian computation of softmax cross entropy in SecureBoost, to align with LightGBM. +* Fix Model initialization error in Homo Neural Network predicting process. + ## Release 1.11.3 ### Major Features and Improvements > FederatedML @@ -14,7 +23,7 @@ * Hetero SecureBoost supports running multiple boosting rounds in complete secure mode with `complete_secure` option > Bug-Fix -* Fix hessian computation of softmax cross entropy in SecureBoostt +* Fix hessian computation of softmax cross entropy in SecureBoost ## Release 1.11.1 diff --git a/deploy/standalone-deploy/README.md b/deploy/standalone-deploy/README.md index 0a389d31cb..344f1973a5 100644 --- a/deploy/standalone-deploy/README.md +++ b/deploy/standalone-deploy/README.md @@ -41,7 +41,7 @@ export version={FATE version for this deployment} example: ```bash -export version=1.11.3 +export version=1.11.4 ``` ### 2.2 Pulling mirrors diff --git a/deploy/standalone-deploy/README.zh.md b/deploy/standalone-deploy/README.zh.md index de1da9b58d..e0c9615722 100644 --- a/deploy/standalone-deploy/README.zh.md +++ b/deploy/standalone-deploy/README.zh.md @@ -35,13 +35,13 @@ 设置部署所需环境变量(注意, 通过以下方式设置的环境变量仅在当前终端会话有效, 若打开新的终端会话, 如重新登录或者新窗口, 请重新设置) ```bash -export version={本次部署的FATE版本号, 如1.11.3} +export version={本次部署的FATE版本号, 如1.11.4} ``` 样例: ```bash -export version=1.11.3 +export version=1.11.4 ``` ### 2.2 拉取镜像 diff --git a/eggroll b/eggroll index bd65899027..da7969f5fa 160000 --- a/eggroll +++ b/eggroll @@ -1 +1 @@ -Subproject commit bd658990272923aabb84b2478affb968c06631aa +Subproject commit da7969f5fa330489fc2a0da3aabacb70916d6987 diff --git a/examples/benchmark_performance/hetero_lr/test_hetero_lr_train_job_conf.json b/examples/benchmark_performance/hetero_lr/test_hetero_lr_train_job_conf.json index 6fff061ab2..b809b08bb5 100644 --- a/examples/benchmark_performance/hetero_lr/test_hetero_lr_train_job_conf.json +++ b/examples/benchmark_performance/hetero_lr/test_hetero_lr_train_job_conf.json @@ -18,10 +18,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -29,6 +39,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -91,6 +104,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff" } diff --git a/examples/benchmark_performance/hetero_sbt/test_hetero_secureboost_train_job_conf.json b/examples/benchmark_performance/hetero_sbt/test_hetero_secureboost_train_job_conf.json index 2dcd7793be..c5b08c212f 100644 --- a/examples/benchmark_performance/hetero_sbt/test_hetero_secureboost_train_job_conf.json +++ b/examples/benchmark_performance/hetero_sbt/test_hetero_secureboost_train_job_conf.json @@ -15,10 +15,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -26,6 +36,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -101,7 +114,8 @@ "ks" ], "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/benchmark_performance/hetero_sshe_lr/test_hetero_sshe_lr_train_job_conf.json b/examples/benchmark_performance/hetero_sshe_lr/test_hetero_sshe_lr_train_job_conf.json index 1c213035b4..aa897af82d 100644 --- a/examples/benchmark_performance/hetero_sshe_lr/test_hetero_sshe_lr_train_job_conf.json +++ b/examples/benchmark_performance/hetero_sshe_lr/test_hetero_sshe_lr_train_job_conf.json @@ -18,10 +18,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -29,6 +39,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -91,6 +104,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff" } diff --git a/examples/benchmark_quality/hetero_fast_sbt/fate-fast-sbt.py b/examples/benchmark_quality/hetero_fast_sbt/fate-fast-sbt.py index 7819718136..cef7e2836d 100644 --- a/examples/benchmark_quality/hetero_fast_sbt/fate-fast-sbt.py +++ b/examples/benchmark_quality/hetero_fast_sbt/fate-fast-sbt.py @@ -72,15 +72,21 @@ def main(config="../../config.yaml", param="./xgb_config_binary.yaml", namespace with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) # secure boost component hetero_fast_sbt_0 = HeteroFastSecureBoost(name="hetero_fast_sbt_0", num_trees=param['tree_num'], task_type=param['task_type'], objective_param={"objective": param['loss_func']}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": param['tree_depth']}, validation_freqs=1, subsample_feature_rate=1, diff --git a/examples/benchmark_quality/hetero_linear_regression/fate-linr.py b/examples/benchmark_quality/hetero_linear_regression/fate-linr.py index 5ed232a259..31b8a33113 100644 --- a/examples/benchmark_quality/hetero_linear_regression/fate-linr.py +++ b/examples/benchmark_quality/hetero_linear_regression/fate-linr.py @@ -71,7 +71,10 @@ def main(config="../../config.yaml", param="./linr_config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection component - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) param = { "penalty": param["penalty"], @@ -79,6 +82,7 @@ def main(config="../../config.yaml", param="./linr_config.yaml", namespace=""): "optimizer": param["optimizer"], "learning_rate": param["learning_rate"], "init_param": param["init_param"], + "encrypt_param": param["encrypt_param"], "batch_size": param["batch_size"], "alpha": param["alpha"] } diff --git a/examples/benchmark_quality/hetero_linear_regression/fate-sshe-linr.py b/examples/benchmark_quality/hetero_linear_regression/fate-sshe-linr.py index 07ac419425..b1a96aeb61 100644 --- a/examples/benchmark_quality/hetero_linear_regression/fate-sshe-linr.py +++ b/examples/benchmark_quality/hetero_linear_regression/fate-sshe-linr.py @@ -79,6 +79,7 @@ def main(config="../../config.yaml", param="./sshe_linr_config.yaml", namespace= "optimizer": param["optimizer"], "learning_rate": param["learning_rate"], "init_param": param["init_param"], + "encrypt_param": param["encrypt_param"], "batch_size": param["batch_size"], "alpha": param["alpha"], "early_stop": param["early_stop"], diff --git a/examples/benchmark_quality/hetero_linear_regression/linr_config.yaml b/examples/benchmark_quality/hetero_linear_regression/linr_config.yaml index a606d01ba0..57c7ae6077 100644 --- a/examples/benchmark_quality/hetero_linear_regression/linr_config.yaml +++ b/examples/benchmark_quality/hetero_linear_regression/linr_config.yaml @@ -11,3 +11,5 @@ alpha: 0.01 tol: 1e-4 init_param: init_method: "zeros" +encrypt_param: + key_length: 1024 diff --git a/examples/benchmark_quality/hetero_linear_regression/sshe_linr_config.yaml b/examples/benchmark_quality/hetero_linear_regression/sshe_linr_config.yaml index 647cc5f115..96894cb776 100644 --- a/examples/benchmark_quality/hetero_linear_regression/sshe_linr_config.yaml +++ b/examples/benchmark_quality/hetero_linear_regression/sshe_linr_config.yaml @@ -12,3 +12,5 @@ early_stop: "diff" reveal_strategy: "respectively" init_param: init_method: "zeros" +encrypt_param: + key_length: 1024 diff --git a/examples/benchmark_quality/hetero_lr/pipeline-lr-binary.py b/examples/benchmark_quality/hetero_lr/pipeline-lr-binary.py index e71dae068d..acafddf8c0 100644 --- a/examples/benchmark_quality/hetero_lr/pipeline-lr-binary.py +++ b/examples/benchmark_quality/hetero_lr/pipeline-lr-binary.py @@ -89,7 +89,10 @@ def main(config="../../config.yaml", param="./lr_config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection component - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) lr_param = { } @@ -109,6 +112,9 @@ def main(config="../../config.yaml", param="./lr_config.yaml", namespace=""): "init_param": { "init_method": param.get("init_method", 'random_uniform'), "random_seed": param.get("random_seed", 103) + }, + "encrypt_param": { + "key_length": 1024 } } lr_param.update(config_param) diff --git a/examples/benchmark_quality/hetero_lr/pipeline-lr-multi.py b/examples/benchmark_quality/hetero_lr/pipeline-lr-multi.py index e921c1c605..8359119f06 100644 --- a/examples/benchmark_quality/hetero_lr/pipeline-lr-multi.py +++ b/examples/benchmark_quality/hetero_lr/pipeline-lr-multi.py @@ -77,7 +77,10 @@ def main(config="../../config.yaml", param="./vehicle_config.yaml", namespace="" data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection component - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) lr_param = { } @@ -95,6 +98,9 @@ def main(config="../../config.yaml", param="./vehicle_config.yaml", namespace="" "init_param": { "init_method": param.get("init_method", 'random_uniform'), "random_seed": param.get("random_seed", 103) + }, + "encrypt_param": { + "key_length": 1024 } } lr_param.update(config_param) diff --git a/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-binary.py b/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-binary.py index 1485a9f0c7..f2cdaa0a2d 100644 --- a/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-binary.py +++ b/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-binary.py @@ -88,7 +88,10 @@ def main(config="../../config.yaml", param="./lr_config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection component - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) lr_param = { } @@ -107,6 +110,9 @@ def main(config="../../config.yaml", param="./lr_config.yaml", namespace=""): "random_seed": param.get("random_seed", 103), "fit_intercept": True }, + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": param.get("reveal_strategy", "respectively"), "reveal_every_iter": True } diff --git a/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-multi.py b/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-multi.py index 3dcb05ea00..4cf0e4119d 100644 --- a/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-multi.py +++ b/examples/benchmark_quality/hetero_lr/pipeline-sshe-lr-multi.py @@ -78,7 +78,10 @@ def main(config="../../config.yaml", param="./vehicle_sshe_lr_config.yaml", name data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection component - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) lr_param = { } @@ -96,6 +99,9 @@ def main(config="../../config.yaml", param="./vehicle_sshe_lr_config.yaml", name "random_seed": param.get("random_seed", 103), "fit_intercept": True }, + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": param.get("reveal_strategy", "respectively"), "reveal_every_iter": True } diff --git a/examples/benchmark_quality/hetero_nn/fate-hetero_nn.py b/examples/benchmark_quality/hetero_nn/fate-hetero_nn.py index 598d01e285..2bba686af3 100644 --- a/examples/benchmark_quality/hetero_nn/fate-hetero_nn.py +++ b/examples/benchmark_quality/hetero_nn/fate-hetero_nn.py @@ -107,7 +107,10 @@ def main( role='host', party_id=host).component_param( with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) guest_bottom, host_bottom, interactive_layer, top_layer = build( param, param['shape1'], param['shape2']) @@ -128,6 +131,7 @@ def main( interactive_layer_lr=param["learning_rate"], batch_size=param["batch_size"], seed=100, + encrypt_param={"key_length": 1024}, dataset=ds_param) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/benchmark_quality/hetero_nn_pytorch/fate-hetero_nn.py b/examples/benchmark_quality/hetero_nn_pytorch/fate-hetero_nn.py index 5721a4ab23..4f44c326f7 100644 --- a/examples/benchmark_quality/hetero_nn_pytorch/fate-hetero_nn.py +++ b/examples/benchmark_quality/hetero_nn_pytorch/fate-hetero_nn.py @@ -46,7 +46,10 @@ def main(config="./config.yaml", param="./hetero_nn_breast_config.yaml", namespa data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) guest_input_shape = param['guest_input_shape'] host_input_shape = param['host_input_shape'] @@ -78,7 +81,7 @@ def main(config="./config.yaml", param="./hetero_nn_breast_config.yaml", namespa hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=param["epochs"], interactive_layer_lr=param["learning_rate"], batch_size=param["batch_size"], - early_stop="diff") + early_stop="diff", encrypt_param={"key_length": 1024}) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) guest_nn_0.add_bottom_model(bottom_model_guest) guest_nn_0.add_top_model(top_model_guest) diff --git a/examples/benchmark_quality/hetero_sbt/fate-sbt.py b/examples/benchmark_quality/hetero_sbt/fate-sbt.py index eae189819e..f70db5580f 100644 --- a/examples/benchmark_quality/hetero_sbt/fate-sbt.py +++ b/examples/benchmark_quality/hetero_sbt/fate-sbt.py @@ -70,8 +70,14 @@ def main(config="../../config.yaml", param="./xgb_config_binary.yaml", namespace data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) # secure boost component multi_mode = 'single_output' @@ -81,7 +87,7 @@ def main(config="../../config.yaml", param="./xgb_config_binary.yaml", namespace num_trees=param['tree_num'], task_type=param['task_type'], objective_param={"objective": param['loss_func']}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": param['tree_depth']}, validation_freqs=1, learning_rate=param['learning_rate'], diff --git a/examples/dsl/v2/data_split/test_hetero_data_split_job_conf.json b/examples/dsl/v2/data_split/test_hetero_data_split_job_conf.json index ea8fee40ee..3fcb2891fa 100644 --- a/examples/dsl/v2/data_split/test_hetero_data_split_job_conf.json +++ b/examples/dsl/v2/data_split/test_hetero_data_split_job_conf.json @@ -32,6 +32,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -39,6 +42,14 @@ "early_stop": "weight_diff", "decay": 0.0, "decay_sqrt": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/data_split/test_hetero_data_split_multi_model_job_conf.json b/examples/dsl/v2/data_split/test_hetero_data_split_multi_model_job_conf.json index c074ce011c..c3162caf24 100644 --- a/examples/dsl/v2/data_split/test_hetero_data_split_multi_model_job_conf.json +++ b/examples/dsl/v2/data_split/test_hetero_data_split_multi_model_job_conf.json @@ -29,6 +29,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -36,6 +39,14 @@ "early_stop": "weight_diff", "decay": 0.0, "decay_sqrt": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/data_statistics/data_statistics_all_columns_conf.json b/examples/dsl/v2/data_statistics/data_statistics_all_columns_conf.json index 041dce5e3e..6607996ac6 100644 --- a/examples/dsl/v2/data_statistics/data_statistics_all_columns_conf.json +++ b/examples/dsl/v2/data_statistics/data_statistics_all_columns_conf.json @@ -45,6 +45,14 @@ "data_transform_0": { "output_format": "dense" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/data_statistics/data_statistics_partial_column_conf.json b/examples/dsl/v2/data_statistics/data_statistics_partial_column_conf.json index 436106db23..856905a346 100644 --- a/examples/dsl/v2/data_statistics/data_statistics_partial_column_conf.json +++ b/examples/dsl/v2/data_statistics/data_statistics_partial_column_conf.json @@ -45,6 +45,14 @@ "data_transform_0": { "output_format": "dense" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/data_statistics/data_statistics_partial_column_missing_conf.json b/examples/dsl/v2/data_statistics/data_statistics_partial_column_missing_conf.json index ef98bc9463..b87ec37799 100644 --- a/examples/dsl/v2/data_statistics/data_statistics_partial_column_missing_conf.json +++ b/examples/dsl/v2/data_statistics/data_statistics_partial_column_missing_conf.json @@ -47,6 +47,14 @@ "output_format": "dense", "missing_fill": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/data_statistics/data_statistics_partial_column_name_conf.json b/examples/dsl/v2/data_statistics/data_statistics_partial_column_name_conf.json index 5f1b1fad9b..2559532442 100644 --- a/examples/dsl/v2/data_statistics/data_statistics_partial_column_name_conf.json +++ b/examples/dsl/v2/data_statistics/data_statistics_partial_column_name_conf.json @@ -45,6 +45,14 @@ "data_transform_0": { "output_format": "dense" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/feature_imputation/feature_imputation_column_method_job_conf.json b/examples/dsl/v2/feature_imputation/feature_imputation_column_method_job_conf.json index dd0ddc0e67..e74315af74 100644 --- a/examples/dsl/v2/feature_imputation/feature_imputation_column_method_job_conf.json +++ b/examples/dsl/v2/feature_imputation/feature_imputation_column_method_job_conf.json @@ -50,6 +50,14 @@ 0 ], "default_value": 42 + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/feature_imputation/feature_imputation_designated_job_conf.json b/examples/dsl/v2/feature_imputation/feature_imputation_designated_job_conf.json index fec6c78540..f4f1c1d01e 100644 --- a/examples/dsl/v2/feature_imputation/feature_imputation_designated_job_conf.json +++ b/examples/dsl/v2/feature_imputation/feature_imputation_designated_job_conf.json @@ -45,6 +45,14 @@ "missing_impute": [ 0 ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/feature_imputation/feature_imputation_method_job_conf.json b/examples/dsl/v2/feature_imputation/feature_imputation_method_job_conf.json index 8645818343..3a7c422b5a 100644 --- a/examples/dsl/v2/feature_imputation/feature_imputation_method_job_conf.json +++ b/examples/dsl/v2/feature_imputation/feature_imputation_method_job_conf.json @@ -44,6 +44,14 @@ "missing_impute": [ 0 ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/feature_scale/test_feature_scale_cap_conf.json b/examples/dsl/v2/feature_scale/test_feature_scale_cap_conf.json index bb51d907d1..5593d7050e 100644 --- a/examples/dsl/v2/feature_scale/test_feature_scale_cap_conf.json +++ b/examples/dsl/v2/feature_scale/test_feature_scale_cap_conf.json @@ -38,6 +38,9 @@ "optimizer": "rmsprop", "batch_size": 320, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "random_uniform" }, @@ -49,6 +52,14 @@ "mode": "cap", "feat_upper": 1, "feat_lower": 0 + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/feature_scale/test_feature_scale_normal_conf.json b/examples/dsl/v2/feature_scale/test_feature_scale_normal_conf.json index e7687d3e35..8d936fe2a4 100644 --- a/examples/dsl/v2/feature_scale/test_feature_scale_normal_conf.json +++ b/examples/dsl/v2/feature_scale/test_feature_scale_normal_conf.json @@ -38,6 +38,9 @@ "optimizer": "rmsprop", "batch_size": 320, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "random_uniform" }, @@ -47,6 +50,14 @@ "feature_scale_0": { "method": "min_max_scale", "mode": "normal" + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/feldman_verifiable_sum/feldman_verifiable_sum_testsuite.json b/examples/dsl/v2/feldman_verifiable_sum/feldman_verifiable_sum_testsuite.json deleted file mode 100644 index 8bf7c6b425..0000000000 --- a/examples/dsl/v2/feldman_verifiable_sum/feldman_verifiable_sum_testsuite.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "data": [ - { - "file": "examples/data/breast_homo_test.csv", - "head": 1, - "partition": 16, - "table_name": "breast_homo_testt", - "namespace": "experiment", - "role": "guest_0" - }, - { - "file": "examples/data/breast_homo_test.csv", - "head": 1, - "partition": 16, - "table_name": "breast_homo_test", - "namespace": "experiment", - "role": "host_0" - }, - { - "file": "examples/data/breast_homo_test.csv", - "head": 1, - "partition": 16, - "table_name": "breast_homo_test", - "namespace": "experiment", - "role": "host_1" - } - ], - "tasks": { - "feldman-secret-sharing-sum": { - "conf": "test_feldman_verifiable_sum_conf.json", - "dsl": "test_feldman_verifiable_sum_dsl.json" - } - } -} \ No newline at end of file diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_asymmetric_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_asymmetric_conf.json index 0ad9725d03..1ebc2a0ed8 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_asymmetric_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_asymmetric_conf.json @@ -46,6 +46,9 @@ 2 ], "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -85,6 +88,9 @@ "bin_indexes": -1, "bin_names": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -102,6 +108,16 @@ } } } + }, + "common": { + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + } } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_conf.json index c1c5e5883d..2b1a3d3815 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_conf.json @@ -75,6 +75,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_missing_value_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_missing_value_conf.json index eceb84e5da..8d23bf9f24 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_missing_value_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_bucket_binning_missing_value_conf.json @@ -93,6 +93,9 @@ "category_names": null, "adjustment_factor": 0.5, "local_only": false, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": null } @@ -109,9 +112,20 @@ "category_names": null, "adjustment_factor": 0.5, "local_only": false, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": null } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_category_binning_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_category_binning_conf.json index 7b00cf21ce..28366daf80 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_category_binning_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_category_binning_conf.json @@ -64,12 +64,23 @@ "bin_indexes": -1, "bin_names": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, "transform_type": "bin_num" }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_large_bin_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_large_bin_conf.json index 9a41f191dd..c5c846d57b 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_large_bin_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_large_bin_conf.json @@ -60,12 +60,23 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, "transform_type": "bin_num" }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_manual_split_points_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_manual_split_points_conf.json index f2330b334e..842a68dd96 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_manual_split_points_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_manual_split_points_conf.json @@ -52,6 +52,9 @@ 2 ], "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -109,6 +112,9 @@ "bin_indexes": -1, "bin_names": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -148,6 +154,24 @@ } } } + }, + "common": { + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + } } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_missing_value_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_missing_value_conf.json index 57ac429f27..5b7dcae32d 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_missing_value_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_missing_value_conf.json @@ -89,6 +89,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": null }, @@ -109,10 +112,29 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": null }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_bucket_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_bucket_conf.json index a865fe1317..c4d8f0ada7 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_bucket_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_bucket_conf.json @@ -74,7 +74,18 @@ "bin_names": null, "category_indexes": null, "category_names": null, - "local_only": false + "local_only": false, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_conf.json index 936e36fa58..dca9f3cb80 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_conf.json @@ -71,12 +71,23 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, "transform_type": "bin_num" }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_optimal_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_optimal_conf.json index 8912ccb0ce..310bdee91f 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_optimal_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_optimal_conf.json @@ -71,6 +71,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -85,6 +88,14 @@ "init_bin_nums": 100, "mixture": false } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_sparse_optimal_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_sparse_optimal_conf.json index 161467627b..4101142e0f 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_sparse_optimal_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multi_host_sparse_optimal_conf.json @@ -71,6 +71,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -85,6 +88,14 @@ "init_bin_nums": 100, "mixture": false } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_conf.json index 9e99b1d33f..ba132a28a1 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_conf.json @@ -86,6 +86,9 @@ "bin_indexes": -1, "bin_names": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -100,6 +103,22 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_multihost_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_multihost_conf.json index 510eb702bb..b790563d07 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_multihost_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_multiclass_multihost_conf.json @@ -87,6 +87,9 @@ "bin_indexes": -1, "bin_names": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -101,6 +104,22 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_chi_square_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_chi_square_conf.json index 6502220588..28898910d2 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_chi_square_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_chi_square_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_gini_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_gini_conf.json index d0f49fdfc8..814620a244 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_gini_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_gini_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_iv_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_iv_conf.json index 91cb64b0cf..8ef0b67340 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_iv_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_iv_conf.json @@ -58,6 +58,9 @@ "bin_num": 10, "bin_indexes": -1, "bin_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -72,6 +75,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_ks_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_ks_conf.json index f0c62f509a..237126e736 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_ks_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_optim_ks_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_quantile_binning_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_quantile_binning_conf.json index 40cf39258d..f45f771913 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_quantile_binning_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_quantile_binning_conf.json @@ -60,12 +60,23 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, "transform_type": "bin_num" }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_skip_statistic_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_skip_statistic_conf.json index 7f04179c0d..8368ea8b37 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_skip_statistic_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_skip_statistic_conf.json @@ -79,6 +79,22 @@ "skip_static": true, "local_only": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "one_hot_encoder_0": { "transform_col_indexes": -1, "transform_col_names": [], diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_bucket_binning_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_bucket_binning_conf.json index eb38bef94b..568fff8c9e 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_bucket_binning_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_bucket_binning_conf.json @@ -60,12 +60,23 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, "transform_type": "bin_num" }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_chi_square_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_chi_square_conf.json index 7bc4ba9ba9..06a2951761 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_chi_square_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_chi_square_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_gini_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_gini_conf.json index 033604d928..c469915e66 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_gini_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_gini_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_iv_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_iv_conf.json index ca040c1783..ef5692aaf5 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_iv_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_iv_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_ks_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_ks_conf.json index 22d13799b2..3d794a2794 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_ks_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_optimal_ks_conf.json @@ -60,6 +60,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -74,6 +77,14 @@ "init_bin_nums": 100, "mixture": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_quantile_binning_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_quantile_binning_conf.json index 57d6e1306e..d1f6bcb58c 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_quantile_binning_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_sparse_quantile_binning_conf.json @@ -60,12 +60,23 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, "transform_type": "bin_num" }, "local_only": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_binning/hetero_binning_woe_binning_conf.json b/examples/dsl/v2/hetero_feature_binning/hetero_binning_woe_binning_conf.json index 8bd47b100a..2dbd7477a1 100644 --- a/examples/dsl/v2/hetero_feature_binning/hetero_binning_woe_binning_conf.json +++ b/examples/dsl/v2/hetero_feature_binning/hetero_binning_woe_binning_conf.json @@ -74,7 +74,18 @@ "bin_names": null, "category_indexes": null, "category_names": null, - "local_only": false + "local_only": false, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_fast_sbt_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_fast_sbt_conf.json index 86f6abb272..314ac5e36b 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_fast_sbt_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_fast_sbt_conf.json @@ -65,7 +65,8 @@ "roc" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1204 }, "guest_depth": 2, "host_depth": 3, @@ -83,6 +84,14 @@ "take_high": true, "threshold": 0.03 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_selection_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_selection_conf.json index bc32ced31b..2e51823725 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_selection_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_selection_conf.json @@ -54,6 +54,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -72,6 +75,14 @@ "filter_type": "threshold", "threshold": 0.1 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_top_k_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_top_k_conf.json index 45d274d1bf..c738327e0b 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_top_k_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_iv_top_k_conf.json @@ -54,6 +54,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -72,6 +75,14 @@ "filter_type": "top_k", "threshold": 7 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_local_only_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_local_only_conf.json index 5ede8d7b08..3a162d91a0 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_local_only_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_local_only_conf.json @@ -78,6 +78,14 @@ "select_federated": false, "threshold": 1 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_anonymous_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_anonymous_conf.json index 576c22ac04..3b2036a9f9 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_anonymous_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_anonymous_conf.json @@ -62,6 +62,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -105,6 +108,14 @@ "percentile": 0.95, "upper_threshold": 2.0 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_conf.json index 3fb8bf9729..95012fa4fe 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_conf.json @@ -66,6 +66,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -109,6 +112,14 @@ "percentile": 0.95, "upper_threshold": 2.0 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_anonymous_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_anonymous_conf.json index 9a36e966b2..8f41a87aa0 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_anonymous_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_anonymous_conf.json @@ -63,6 +63,14 @@ "filter_out_indexes": null, "filter_out_names": null } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_conf.json index f8e524d0b4..1a1431f9bb 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_manually_left_conf.json @@ -74,6 +74,14 @@ "filter_methods": [ "manually" ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_host_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_host_conf.json index f46cccf860..a376d61fca 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_host_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_host_conf.json @@ -55,6 +55,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -90,6 +93,14 @@ "filter_type": ["threshold", "top_percentile"], "threshold": [0.1, 0.9] } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_iso_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_iso_conf.json index 67ecb6de5d..8f41c08658 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_iso_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multi_iso_conf.json @@ -66,6 +66,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -172,6 +175,22 @@ "take_high": true, "threshold": 0.03 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_all_case_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_all_case_conf.json index 773bfaa079..caf986fef6 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_all_case_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_all_case_conf.json @@ -84,6 +84,9 @@ 2 ], "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -127,6 +130,22 @@ "average" ] } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_conf.json index c8c9018e56..fda4c07df9 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_multiclass_conf.json @@ -84,6 +84,9 @@ 2 ], "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -110,6 +113,22 @@ "threshold": 2, "mul_class_merge_type": "max" } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_conf.json index bf49c3724c..e070122db7 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_conf.json @@ -43,7 +43,8 @@ }, "common": { "hetero_pearson_0": { - "column_indexes": -1 + "column_indexes": -1, + "fixpoint_bit_length": 1024 }, "hetero_feature_selection_0": { "correlation_param": { @@ -60,6 +61,14 @@ "vif_filter", "correlation_filter" ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_predict_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_predict_conf.json index 13014e8a85..b7f0143500 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_predict_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_pearson_predict_conf.json @@ -48,7 +48,8 @@ }, "common": { "hetero_pearson_0": { - "column_indexes": -1 + "column_indexes": -1, + "fixpoint_bit_length": 1024 }, "hetero_feature_selection_0": { "correlation_param": { @@ -64,6 +65,14 @@ "vif_filter", "correlation_filter" ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_percentage_value_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_percentage_value_conf.json index 51fd54a7e5..4f188cdbd5 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_percentage_value_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_percentage_value_conf.json @@ -52,6 +52,14 @@ "percentage_value_param": { "upper_pct": 0.8 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_anonymous_col_names_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_anonymous_col_names_conf.json index 79b158f377..4972b8e3c5 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_anonymous_col_names_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_anonymous_col_names_conf.json @@ -51,7 +51,8 @@ }, "common": { "hetero_pearson_0": { - "column_indexes": -1 + "column_indexes": -1, + "fixpoint_bit_length": 1024 }, "hetero_feature_selection_0": { "vif_param": { @@ -62,6 +63,14 @@ "filter_methods": [ "vif_filter" ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_col_names_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_col_names_conf.json index 38c710aff6..71d81c8185 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_col_names_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_col_names_conf.json @@ -70,6 +70,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -77,6 +80,14 @@ }, "local_only": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_cols_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_cols_conf.json index 7fe4b49a6b..50d4847e37 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_cols_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_select_cols_conf.json @@ -68,6 +68,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -75,6 +78,14 @@ }, "local_only": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_selection_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_selection_conf.json index 88f8bd41ec..fef91b3b48 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_selection_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_selection_conf.json @@ -54,6 +54,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -61,6 +64,14 @@ }, "local_only": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "statistic_0": { "statistics": [ "95%", diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_single_predict_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_single_predict_conf.json index 13d2201302..0a1f8431e8 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_single_predict_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_single_predict_conf.json @@ -69,6 +69,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": null, @@ -104,6 +107,22 @@ "filter_out_indexes": [], "filter_out_names": [] } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_vif_conf.json b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_vif_conf.json index 6dbdbdb4ff..f8d07ec05b 100644 --- a/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_vif_conf.json +++ b/examples/dsl/v2/hetero_feature_selection/hetero_feature_selection_vif_conf.json @@ -43,7 +43,8 @@ }, "common": { "hetero_pearson_0": { - "column_indexes": -1 + "column_indexes": -1, + "fixpoint_bit_length": 1024 }, "hetero_feature_selection_0": { "vif_param": { @@ -54,6 +55,14 @@ "filter_methods": [ "vif_filter" ] + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_ftl/README.md b/examples/dsl/v2/hetero_ftl/README.md deleted file mode 100644 index 84fdf74883..0000000000 --- a/examples/dsl/v2/hetero_ftl/README.md +++ /dev/null @@ -1,58 +0,0 @@ -## Hetero FTL Configuration Usage Guide. - -#### Example Tasks. - -1. Plain Mode: - - example-data: - - (1) guest: nus_wide_train_guest.csv;nus_wide_validate_guest.csv - - (2) host: nus_wide_train_host.csv;nus_wide_validate_host.csv - - dsl: test_ftl_dsl.json - - runtime_config: test_ftl_conf.json - -2. Predict: - - example-data: - - (1) guest: nus_wide_train_guest.csv;nus_wide_validate_guest.csv - - (2) host: nus_wide_train_host.csv;nus_wide_validate_host.csv - - dsl: test_ftl_dsl.json - - runtime_config: test_ftl_predict.json - -3. Encrypted Mode: - - example-data: - - (1) guest: nus_wide_train_guest.csv;nus_wide_validate_guest.csv - - (2) host: nus_wide_train_host.csv;nus_wide_validate_host.csv - - dsl: test_ftl_dsl.json - - runtime_config: test_ftl_encrypted_conf.json - -4. Communication-Efficient: - - example-data: - - (1) guest: nus_wide_train_guest.csv;nus_wide_validate_guest.csv - - (2) host: nus_wide_train_host.csv;nus_wide_validate_host.csv - - dsl: test_ftl_dsl.json - - runtime_config: test_ftl_comm_eff_conf.json - - -Users can use following commands to run a task. - - flow job submit -c ${runtime_config} -d ${dsl} - -Moreover, after successfully running the training task, you can use it to predict too. \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/test_ftl_comm_eff_conf.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_communication_efficient_conf.json similarity index 81% rename from examples/dsl/v2/hetero_ftl/test_ftl_comm_eff_conf.json rename to examples/dsl/v2/hetero_ftl/hetero_ftl_communication_efficient_conf.json index 9c30468a8e..25c2d0fb60 100644 --- a/examples/dsl/v2/hetero_ftl/test_ftl_comm_eff_conf.json +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_communication_efficient_conf.json @@ -5,14 +5,48 @@ "party_id": 9999 }, "role": { - "host": [ - 9998 - ], "guest": [ 9999 + ], + "host": [ + 10000 ] }, + "job_parameters": { + "common": { + "job_type": "train" + } + }, "component_parameters": { + "role": { + "guest": { + "0": { + "reader_0": { + "table": { + "name": "nus_wide_guest", + "namespace": "experiment" + } + }, + "data_transform_0": { + "with_label": true, + "output_format": "dense" + } + } + }, + "host": { + "0": { + "reader_0": { + "table": { + "name": "nus_wide_host", + "namespace": "experiment" + } + }, + "data_transform_0": { + "with_label": false + } + } + } + }, "common": { "hetero_ftl_0": { "epochs": 10, @@ -22,8 +56,16 @@ "communication_efficient": true, "local_round": 5, "optimizer": { - "learning_rate": 0.01, - "decay": 0.0, + "weight_decay": null, + "clipnorm": null, + "global_clipnorm": null, + "clipvalue": null, + "use_ema": false, + "ema_momentum": 0.99, + "ema_overwrite_frequency": null, + "jit_compile": false, + "is_legacy_optimizer": false, + "learning_rate": 0.0010000000474974513, "beta_1": 0.9, "beta_2": 0.999, "epsilon": 1e-07, @@ -40,7 +82,7 @@ "config": { "name": "dense", "trainable": true, - "dtype": null, + "dtype": "float32", "units": 32, "activation": "sigmoid", "use_bias": true, @@ -49,15 +91,12 @@ "config": { "mean": 0.0, "stddev": 1.0, - "seed": null, - "dtype": "float32" + "seed": null } }, "bias_initializer": { "class_name": "Zeros", - "config": { - "dtype": "float32" - } + "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, @@ -68,7 +107,7 @@ } ] }, - "keras_version": "2.2.4-tf", + "keras_version": "2.11.0", "backend": "tensorflow" }, "config_type": "keras" @@ -76,35 +115,6 @@ "evaluation_0": { "eval_type": "binary" } - }, - "role": { - "host": { - "0": { - "reader_0": { - "table": { - "name": "nus_wide_host", - "namespace": "experiment" - } - }, - "data_transform_0": { - "with_label": false - } - } - }, - "guest": { - "0": { - "reader_0": { - "table": { - "name": "nus_wide_guest", - "namespace": "experiment" - } - }, - "data_transform_0": { - "with_label": true, - "output_format": "dense" - } - } - } } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/test_ftl_dsl.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_communication_efficient_dsl.json similarity index 87% rename from examples/dsl/v2/hetero_ftl/test_ftl_dsl.json rename to examples/dsl/v2/hetero_ftl/hetero_ftl_communication_efficient_dsl.json index 77f64fd7ea..9b8cd3d427 100644 --- a/examples/dsl/v2/hetero_ftl/test_ftl_dsl.json +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_communication_efficient_dsl.json @@ -6,7 +6,8 @@ "data": [ "data" ] - } + }, + "provider": "fate_flow" }, "data_transform_0": { "module": "DataTransform", @@ -24,7 +25,8 @@ "model": [ "model" ] - } + }, + "provider": "fate" }, "hetero_ftl_0": { "module": "FTL", @@ -42,7 +44,8 @@ "model": [ "model" ] - } + }, + "provider": "fate" }, "evaluation_0": { "module": "Evaluation", @@ -57,7 +60,8 @@ "data": [ "data" ] - } + }, + "provider": "fate" } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/test_ftl_encrypted_conf.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_encrypted_conf.json similarity index 80% rename from examples/dsl/v2/hetero_ftl/test_ftl_encrypted_conf.json rename to examples/dsl/v2/hetero_ftl/hetero_ftl_encrypted_conf.json index be36256b22..b9408a325e 100644 --- a/examples/dsl/v2/hetero_ftl/test_ftl_encrypted_conf.json +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_encrypted_conf.json @@ -5,23 +5,65 @@ "party_id": 9999 }, "role": { - "host": [ - 9998 - ], "guest": [ 9999 + ], + "host": [ + 10000 ] }, + "job_parameters": { + "common": { + "job_type": "train" + } + }, "component_parameters": { + "role": { + "host": { + "0": { + "reader_0": { + "table": { + "name": "nus_wide_host", + "namespace": "experiment" + } + }, + "data_transform_0": { + "with_label": false + } + } + }, + "guest": { + "0": { + "reader_0": { + "table": { + "name": "nus_wide_guest", + "namespace": "experiment" + } + }, + "data_transform_0": { + "with_label": true, + "output_format": "dense" + } + } + } + }, "common": { "hetero_ftl_0": { - "epochs": 3, + "epochs": 10, "alpha": 1, "batch_size": -1, "mode": "encrypted", "optimizer": { - "learning_rate": 0.01, - "decay": 0.0, + "weight_decay": null, + "clipnorm": null, + "global_clipnorm": null, + "clipvalue": null, + "use_ema": false, + "ema_momentum": 0.99, + "ema_overwrite_frequency": null, + "jit_compile": false, + "is_legacy_optimizer": false, + "learning_rate": 0.0010000000474974513, "beta_1": 0.9, "beta_2": 0.999, "epsilon": 1e-07, @@ -38,7 +80,7 @@ "config": { "name": "dense", "trainable": true, - "dtype": null, + "dtype": "float32", "units": 32, "activation": "sigmoid", "use_bias": true, @@ -47,15 +89,12 @@ "config": { "mean": 0.0, "stddev": 1.0, - "seed": null, - "dtype": "float32" + "seed": null } }, "bias_initializer": { "class_name": "Zeros", - "config": { - "dtype": "float32" - } + "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, @@ -66,7 +105,7 @@ } ] }, - "keras_version": "2.2.4-tf", + "keras_version": "2.11.0", "backend": "tensorflow" }, "config_type": "keras" @@ -74,35 +113,6 @@ "evaluation_0": { "eval_type": "binary" } - }, - "role": { - "host": { - "0": { - "data_transform_0": { - "with_label": false - }, - "reader_0": { - "table": { - "name": "nus_wide_host", - "namespace": "experiment" - } - } - } - }, - "guest": { - "0": { - "data_transform_0": { - "with_label": true, - "output_format": "dense" - }, - "reader_0": { - "table": { - "name": "nus_wide_guest", - "namespace": "experiment" - } - } - } - } } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/test_ftl_predict_dsl.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_encrypted_dsl.json similarity index 56% rename from examples/dsl/v2/hetero_ftl/test_ftl_predict_dsl.json rename to examples/dsl/v2/hetero_ftl/hetero_ftl_encrypted_dsl.json index bb81a3fa49..9b8cd3d427 100644 --- a/examples/dsl/v2/hetero_ftl/test_ftl_predict_dsl.json +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_encrypted_dsl.json @@ -1,48 +1,67 @@ { "components": { - "hetero_ftl_0": { + "reader_0": { + "module": "Reader", + "output": { + "data": [ + "data" + ] + }, + "provider": "fate_flow" + }, + "data_transform_0": { + "module": "DataTransform", "input": { "data": { - "test_data": [ - "data_transform_0.data" + "data": [ + "reader_0.data" ] - }, - "model": [ - "pipeline.hetero_ftl_0.model" - ] + } }, - "module": "FTL", "output": { "data": [ "data" + ], + "model": [ + "model" ] - } + }, + "provider": "fate" }, - "reader_0": { - "module": "Reader", + "hetero_ftl_0": { + "module": "FTL", + "input": { + "data": { + "train_data": [ + "data_transform_0.data" + ] + } + }, "output": { "data": [ "data" + ], + "model": [ + "model" ] - } + }, + "provider": "fate" }, - "data_transform_0": { + "evaluation_0": { + "module": "Evaluation", "input": { "data": { "data": [ - "reader_0.data" + "hetero_ftl_0.data" ] - }, - "model": [ - "pipeline.data_transform_0.model" - ] + } }, - "module": "DataTransform", "output": { "data": [ "data" ] - } + }, + "provider": "fate" } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/test_ftl_conf.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_plain_conf.json similarity index 81% rename from examples/dsl/v2/hetero_ftl/test_ftl_conf.json rename to examples/dsl/v2/hetero_ftl/hetero_ftl_plain_conf.json index 66c0fb4ca2..81d6231f1e 100644 --- a/examples/dsl/v2/hetero_ftl/test_ftl_conf.json +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_plain_conf.json @@ -5,14 +5,48 @@ "party_id": 9999 }, "role": { - "host": [ - 9998 - ], "guest": [ 9999 + ], + "host": [ + 10000 ] }, + "job_parameters": { + "common": { + "job_type": "train" + } + }, "component_parameters": { + "role": { + "host": { + "0": { + "data_transform_0": { + "with_label": false + }, + "reader_0": { + "table": { + "name": "nus_wide_host", + "namespace": "experiment" + } + } + } + }, + "guest": { + "0": { + "data_transform_0": { + "with_label": true, + "output_format": "dense" + }, + "reader_0": { + "table": { + "name": "nus_wide_guest", + "namespace": "experiment" + } + } + } + } + }, "common": { "hetero_ftl_0": { "epochs": 10, @@ -20,8 +54,16 @@ "batch_size": -1, "mode": "plain", "optimizer": { - "learning_rate": 0.01, - "decay": 0.0, + "weight_decay": null, + "clipnorm": null, + "global_clipnorm": null, + "clipvalue": null, + "use_ema": false, + "ema_momentum": 0.99, + "ema_overwrite_frequency": null, + "jit_compile": false, + "is_legacy_optimizer": false, + "learning_rate": 0.0010000000474974513, "beta_1": 0.9, "beta_2": 0.999, "epsilon": 1e-07, @@ -38,7 +80,7 @@ "config": { "name": "dense", "trainable": true, - "dtype": null, + "dtype": "float32", "units": 32, "activation": "sigmoid", "use_bias": true, @@ -47,15 +89,12 @@ "config": { "mean": 0.0, "stddev": 1.0, - "seed": null, - "dtype": "float32" + "seed": null } }, "bias_initializer": { "class_name": "Zeros", - "config": { - "dtype": "float32" - } + "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, @@ -66,7 +105,7 @@ } ] }, - "keras_version": "2.2.4-tf", + "keras_version": "2.11.0", "backend": "tensorflow" }, "config_type": "keras" @@ -74,35 +113,6 @@ "evaluation_0": { "eval_type": "binary" } - }, - "role": { - "guest": { - "0": { - "data_transform_0": { - "with_label": true, - "output_format": "dense" - }, - "reader_0": { - "table": { - "name": "nus_wide_guest", - "namespace": "experiment" - } - } - } - }, - "host": { - "0": { - "data_transform_0": { - "with_label": false - }, - "reader_0": { - "table": { - "name": "nus_wide_host", - "namespace": "experiment" - } - } - } - } } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/hetero_ftl_plain_dsl.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_plain_dsl.json new file mode 100644 index 0000000000..9b8cd3d427 --- /dev/null +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_plain_dsl.json @@ -0,0 +1,67 @@ +{ + "components": { + "reader_0": { + "module": "Reader", + "output": { + "data": [ + "data" + ] + }, + "provider": "fate_flow" + }, + "data_transform_0": { + "module": "DataTransform", + "input": { + "data": { + "data": [ + "reader_0.data" + ] + } + }, + "output": { + "data": [ + "data" + ], + "model": [ + "model" + ] + }, + "provider": "fate" + }, + "hetero_ftl_0": { + "module": "FTL", + "input": { + "data": { + "train_data": [ + "data_transform_0.data" + ] + } + }, + "output": { + "data": [ + "data" + ], + "model": [ + "model" + ] + }, + "provider": "fate" + }, + "evaluation_0": { + "module": "Evaluation", + "input": { + "data": { + "data": [ + "hetero_ftl_0.data" + ] + } + }, + "output": { + "data": [ + "data" + ] + }, + "provider": "fate" + } + } +} \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/hetero_ftl_testsuite.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_testsuite.json index cb1dff5e2e..5630acb812 100644 --- a/examples/dsl/v2/hetero_ftl/hetero_ftl_testsuite.json +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_testsuite.json @@ -34,22 +34,21 @@ } ], "tasks": { - "ftl": { - "conf": "./test_ftl_conf.json", - "dsl": "./test_ftl_dsl.json" + "hetero_ftl_plain": { + "conf": "hetero_ftl_plain_conf.json", + "dsl": "hetero_ftl_plain_dsl.json" }, - "ftl_predict": { - "conf": "./test_ftl_predict.json", - "dsl": "./test_ftl_predict_dsl.json", - "deps": "ftl" + "hetero_ftl_communication_efficient": { + "conf": "hetero_ftl_communication_efficient_conf.json", + "dsl": "hetero_ftl_communication_efficient_dsl.json" }, - "encrypted_ftl": { - "conf": "./test_ftl_encrypted_conf.json", - "dsl": "./test_ftl_dsl.json" + "hetero_ftl_with_predict": { + "conf": "hetero_ftl_with_predict_conf.json", + "dsl": "hetero_ftl_with_predict_dsl.json" }, - "comm_eff_ftl": { - "conf": "./test_ftl_comm_eff_conf.json", - "dsl": "./test_ftl_dsl.json" + "hetero_ftl_encrypted": { + "conf": "hetero_ftl_encrypted_conf.json", + "dsl": "hetero_ftl_encrypted_dsl.json" } } } \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/hetero_ftl_with_predict_conf.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_with_predict_conf.json new file mode 100644 index 0000000000..81d6231f1e --- /dev/null +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_with_predict_conf.json @@ -0,0 +1,118 @@ +{ + "dsl_version": 2, + "initiator": { + "role": "guest", + "party_id": 9999 + }, + "role": { + "guest": [ + 9999 + ], + "host": [ + 10000 + ] + }, + "job_parameters": { + "common": { + "job_type": "train" + } + }, + "component_parameters": { + "role": { + "host": { + "0": { + "data_transform_0": { + "with_label": false + }, + "reader_0": { + "table": { + "name": "nus_wide_host", + "namespace": "experiment" + } + } + } + }, + "guest": { + "0": { + "data_transform_0": { + "with_label": true, + "output_format": "dense" + }, + "reader_0": { + "table": { + "name": "nus_wide_guest", + "namespace": "experiment" + } + } + } + } + }, + "common": { + "hetero_ftl_0": { + "epochs": 10, + "alpha": 1, + "batch_size": -1, + "mode": "plain", + "optimizer": { + "weight_decay": null, + "clipnorm": null, + "global_clipnorm": null, + "clipvalue": null, + "use_ema": false, + "ema_momentum": 0.99, + "ema_overwrite_frequency": null, + "jit_compile": false, + "is_legacy_optimizer": false, + "learning_rate": 0.0010000000474974513, + "beta_1": 0.9, + "beta_2": 0.999, + "epsilon": 1e-07, + "amsgrad": false, + "optimizer": "Adam" + }, + "nn_define": { + "class_name": "Sequential", + "config": { + "name": "sequential", + "layers": [ + { + "class_name": "Dense", + "config": { + "name": "dense", + "trainable": true, + "dtype": "float32", + "units": 32, + "activation": "sigmoid", + "use_bias": true, + "kernel_initializer": { + "class_name": "RandomNormal", + "config": { + "mean": 0.0, + "stddev": 1.0, + "seed": null + } + }, + "bias_initializer": { + "class_name": "Zeros", + "config": {} + }, + "kernel_regularizer": null, + "bias_regularizer": null, + "activity_regularizer": null, + "kernel_constraint": null, + "bias_constraint": null + } + } + ] + }, + "keras_version": "2.11.0", + "backend": "tensorflow" + }, + "config_type": "keras" + }, + "evaluation_0": { + "eval_type": "binary" + } + } + } +} \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/hetero_ftl_with_predict_dsl.json b/examples/dsl/v2/hetero_ftl/hetero_ftl_with_predict_dsl.json new file mode 100644 index 0000000000..9b8cd3d427 --- /dev/null +++ b/examples/dsl/v2/hetero_ftl/hetero_ftl_with_predict_dsl.json @@ -0,0 +1,67 @@ +{ + "components": { + "reader_0": { + "module": "Reader", + "output": { + "data": [ + "data" + ] + }, + "provider": "fate_flow" + }, + "data_transform_0": { + "module": "DataTransform", + "input": { + "data": { + "data": [ + "reader_0.data" + ] + } + }, + "output": { + "data": [ + "data" + ], + "model": [ + "model" + ] + }, + "provider": "fate" + }, + "hetero_ftl_0": { + "module": "FTL", + "input": { + "data": { + "train_data": [ + "data_transform_0.data" + ] + } + }, + "output": { + "data": [ + "data" + ], + "model": [ + "model" + ] + }, + "provider": "fate" + }, + "evaluation_0": { + "module": "Evaluation", + "input": { + "data": { + "data": [ + "hetero_ftl_0.data" + ] + } + }, + "output": { + "data": [ + "data" + ] + }, + "provider": "fate" + } + } +} \ No newline at end of file diff --git a/examples/dsl/v2/hetero_ftl/test_ftl_predict.json b/examples/dsl/v2/hetero_ftl/test_ftl_predict.json deleted file mode 100644 index 39a5a13572..0000000000 --- a/examples/dsl/v2/hetero_ftl/test_ftl_predict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "dsl_version": 2, - "initiator": { - "role": "guest", - "party_id": 9999 - }, - "role": { - "host": [ - 10000 - ], - "guest": [ - 9999 - ] - }, - "job_parameters": { - "common": { - "model_id": "guest-9999#host-10000#model", - "model_version": "20201013120134140299386", - "job_type": "predict" - } - }, - "component_parameters": { - "role": { - "host": { - "0": { - "reader_0": { - "table": { - "name": "nus_wide_host", - "namespace": "experiment" - } - } - } - }, - "guest": { - "0": { - "reader_0": { - "table": { - "name": "nus_wide_guest", - "namespace": "experiment" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_cv_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_cv_job_conf.json index b5ab8e6cc4..b67a025f17 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_cv_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_cv_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -39,6 +42,14 @@ }, "decay": 0.0, "decay_sqrt": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_cv_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_cv_job_conf.json index ba019daabb..ffe76bdd95 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_cv_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_cv_job_conf.json @@ -25,6 +25,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -38,6 +41,14 @@ }, "decay": 0.0, "decay_sqrt": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_predict_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_predict_job_conf.json index c5fb5bbc25..9a57657abc 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_predict_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_predict_job_conf.json @@ -40,6 +40,14 @@ "decay": 0.0, "decay_sqrt": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_train_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_train_job_conf.json index 8c3127d9b4..71babd66bf 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_train_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_multi_host_train_job_conf.json @@ -25,6 +25,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -33,6 +36,14 @@ "decay": 0.0, "decay_sqrt": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_job_conf.json index 18153126e7..f84a3a17df 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -33,6 +36,14 @@ "decay_sqrt": false, "floating_point_precision": 23 }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sample_weight_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sample_weight_job_conf.json index a5610c7429..44bcf19988 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sample_weight_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sample_weight_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -33,6 +36,14 @@ "decay_sqrt": false, "floating_point_precision": 23 }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_job_conf.json index ec6b65e5f9..3a6cbcd190 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_job_conf.json @@ -29,6 +29,9 @@ "optimizer": "sgd", "batch_size": 100, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -37,6 +40,14 @@ "decay": 0.0, "decay_sqrt": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_sqn_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_sqn_job_conf.json index f05e1f7186..cbf89026f4 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_sqn_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sparse_sqn_job_conf.json @@ -29,6 +29,9 @@ "optimizer": "sgd", "batch_size": 100, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -43,6 +46,14 @@ "decay": 0.0, "decay_sqrt": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sqn_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sqn_job_conf.json index 831a43d610..9f1344aeba 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sqn_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_train_sqn_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "sqn", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -39,6 +42,14 @@ "decay_sqrt": false, "floating_point_precision": 23 }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_validate_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_validate_job_conf.json index 28c4359a3d..86448650c5 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_validate_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_validate_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -45,6 +48,22 @@ "use_first_metric_only": false, "save_freq": 1 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_warm_start_job_conf.json b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_warm_start_job_conf.json index ae6097766e..8ef6001ecf 100644 --- a/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_warm_start_job_conf.json +++ b/examples/dsl/v2/hetero_linear_regression/test_hetero_linr_warm_start_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -49,7 +52,26 @@ "early_stop": "weight_diff", "decay": 0.0, "decay_sqrt": false, - "floating_point_precision": 23 + "floating_point_precision": 23, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "regression", diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_batch_random_strategy_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_batch_random_strategy_conf.json index 263b644ea4..962a2b655e 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_batch_random_strategy_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_batch_random_strategy_conf.json @@ -56,6 +56,9 @@ "batch_size": 320, "batch_strategy": "random", "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -74,6 +77,14 @@ "random_seed": null } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_cv_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_cv_conf.json index 3424c5a323..0a94a2409d 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_cv_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_cv_conf.json @@ -55,6 +55,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -66,6 +69,14 @@ "random_seed": 103, "need_cv": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_early_stop_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_early_stop_conf.json index 6065ed883c..2fef8f9630 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_early_stop_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_early_stop_conf.json @@ -67,6 +67,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -89,6 +92,14 @@ "random_seed": null } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_feature_engineering_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_feature_engineering_conf.json index c4edb6dd53..2deafb9a29 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_feature_engineering_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_feature_engineering_conf.json @@ -58,6 +58,9 @@ "adjustment_factor": 0.5, "bin_num": 10, "bin_indexes": -1, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_type": "bin_num" @@ -95,6 +98,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "random_uniform" }, @@ -107,6 +113,14 @@ "need_cv": false } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_multi_host_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_multi_host_conf.json index 9e9d3b1ef9..900d234e17 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_multi_host_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_multi_host_conf.json @@ -56,6 +56,9 @@ "optimizer": "nesterov_momentum_sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -74,6 +77,14 @@ "random_seed": null } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_normal_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_normal_conf.json index 25c43fa1e1..b0e9677abd 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_normal_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_normal_conf.json @@ -55,6 +55,9 @@ "optimizer": "rmsprop", "batch_size": 320, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -73,6 +76,14 @@ "random_seed": null } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_one_vs_all_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_one_vs_all_conf.json index 4dd9999809..96280a7ccb 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_one_vs_all_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_one_vs_all_conf.json @@ -55,6 +55,9 @@ "optimizer": "nesterov_momentum_sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -62,6 +65,14 @@ "early_stop": "diff", "multi_class": "ovr" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_cv_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_cv_conf.json index 7c88b7370a..8b5cd3c56c 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_cv_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_cv_conf.json @@ -55,6 +55,9 @@ "optimizer": "nesterov_momentum_sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -66,6 +69,14 @@ "random_seed": 103, "need_cv": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_validate_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_validate_conf.json index f6ae9b7662..e63e281b18 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_validate_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_ovr_validate_conf.json @@ -67,6 +67,9 @@ "optimizer": "nesterov_momentum_sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -87,6 +90,22 @@ "use_first_metric_only": false } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sample_weights_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sample_weights_conf.json index f3dc76ae14..c5dc2c2179 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sample_weights_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sample_weights_conf.json @@ -62,6 +62,9 @@ "optimizer": "rmsprop", "batch_size": 320, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -75,6 +78,14 @@ }, "decay": 1.0, "decay_sqrt": true + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_conf.json index f51e1319df..436710cb36 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_conf.json @@ -55,6 +55,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -73,6 +76,14 @@ "random_seed": null } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_cv_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_cv_conf.json index 7c31bcd356..7e44357c1f 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_cv_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_sparse_cv_conf.json @@ -55,6 +55,9 @@ "optimizer": "nesterov_momentum_sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "random_uniform" }, @@ -66,6 +69,14 @@ "random_seed": 103, "need_cv": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_validate_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_validate_conf.json index 6559b11973..991491cbf5 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_validate_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_validate_conf.json @@ -91,6 +91,22 @@ "use_first_metric_only": false } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_warm_start_conf.json b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_warm_start_conf.json index 706b1d91a1..b44a00e459 100644 --- a/examples/dsl/v2/hetero_logistic_regression/hetero_lr_warm_start_conf.json +++ b/examples/dsl/v2/hetero_logistic_regression/hetero_lr_warm_start_conf.json @@ -76,6 +76,22 @@ "key_length": 1024 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_coae_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_coae_conf.json index e38ac733d8..a7fc8d68b2 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_coae_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_coae_conf.json @@ -114,6 +114,9 @@ "enable": true, "epoch": 100 }, + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -126,6 +129,7 @@ "optimizer": "Adam", "config_type": "pytorch" }, + "bottom_nn_define": null, "top_nn_define": null, "interactive_layer_define": { @@ -159,6 +163,14 @@ "top_nn_define": null, "interactive_layer_define": null, "loss": null + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_conf.json index 56d89fdcac..8f4e303a8f 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_conf.json @@ -104,6 +104,9 @@ "batch_size": -1, "validation_freqs": 1, "task_type": "classification", + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -141,6 +144,14 @@ "loss_fn": "BCELoss" } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_drop_out_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_drop_out_conf.json index c3b539aeba..845fbea85b 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_drop_out_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_drop_out_conf.json @@ -116,6 +116,9 @@ "batch_size": -1, "validation_freqs": 1, "task_type": "classification", + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -153,6 +156,14 @@ "loss_fn": "BCELoss" } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_multi_host_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_multi_host_conf.json index 22b8974b62..643620d829 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_multi_host_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_multi_host_conf.json @@ -134,6 +134,9 @@ "batch_size": -1, "validation_freqs": 1, "task_type": "classification", + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -171,6 +174,14 @@ "loss_fn": "BCELoss" } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_selective_bp_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_selective_bp_conf.json index 09d3cb9bc8..dd1cf95cb4 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_selective_bp_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_binary_selective_bp_conf.json @@ -119,6 +119,9 @@ "selector_param": { "method": "relative" }, + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -156,6 +159,14 @@ "loss_fn": "BCELoss" } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_multi_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_multi_conf.json index 693acc18ca..680d4ef2d2 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_multi_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_multi_conf.json @@ -108,6 +108,9 @@ "selector_param": { "method": "relative" }, + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.05, "betas": [ @@ -154,6 +157,14 @@ } } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_with_check_point_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_with_check_point_conf.json index 869f5afc9c..41e29e81e2 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_with_check_point_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_with_check_point_conf.json @@ -110,6 +110,9 @@ ], "save_freq": 1 }, + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -147,6 +150,14 @@ "loss_fn": "BCELoss" } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_with_early_stop_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_with_early_stop_conf.json index b78c8adc9e..5b4852d260 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_with_early_stop_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_with_early_stop_conf.json @@ -132,6 +132,9 @@ "AUC" ] }, + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -169,6 +172,22 @@ "loss_fn": "BCELoss" } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_nn/hetero_nn_train_with_warm_start_conf.json b/examples/dsl/v2/hetero_nn/hetero_nn_train_with_warm_start_conf.json index df76faf4cf..38021b1dbe 100644 --- a/examples/dsl/v2/hetero_nn/hetero_nn_train_with_warm_start_conf.json +++ b/examples/dsl/v2/hetero_nn/hetero_nn_train_with_warm_start_conf.json @@ -104,6 +104,9 @@ "batch_size": -1, "validation_freqs": 1, "task_type": "classification", + "encrypt_param": { + "key_length": 1024 + }, "optimizer": { "lr": 0.01, "betas": [ @@ -153,6 +156,14 @@ "interactive_layer_define": null, "loss": null }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "eval_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_default_conf.json b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_default_conf.json index 4d1cdfe39d..20a60be472 100644 --- a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_default_conf.json +++ b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_default_conf.json @@ -15,7 +15,16 @@ "component_parameters": { "common": { "hetero_pearson_0": { - "column_indexes": -1 + "column_indexes": -1, + "fixpoint_bit_length": 1024 + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_host_only_conf.json b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_host_only_conf.json index b18456d2b5..f6ff7960d9 100644 --- a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_host_only_conf.json +++ b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_host_only_conf.json @@ -17,6 +17,14 @@ "hetero_pearson_0": { "column_indexes": -1, "cross_parties": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_mix_rand_conf.json b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_mix_rand_conf.json index c8100a50d6..cc08dea9a9 100644 --- a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_mix_rand_conf.json +++ b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_mix_rand_conf.json @@ -16,7 +16,16 @@ "common": { "hetero_pearson_0": { "column_indexes": -1, - "use_mix_rand": true + "use_mix_rand": true, + "fixpoint_bit_length": 1024 + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_sole_conf.json b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_sole_conf.json index fb5d860721..0eaa06a642 100644 --- a/examples/dsl/v2/hetero_pearson/test_hetero_pearson_sole_conf.json +++ b/examples/dsl/v2/hetero_pearson/test_hetero_pearson_sole_conf.json @@ -17,6 +17,14 @@ "hetero_pearson_0": { "column_indexes": -1, "cross_parties": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_cv_job_conf.json b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_cv_job_conf.json index 5445386b85..ff2aa1ce2a 100644 --- a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_cv_job_conf.json +++ b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_cv_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.01, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -37,6 +40,14 @@ }, "decay_sqrt": false, "exposure_colname": "exposure" + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_job_conf.json b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_job_conf.json index 10b52537f5..ed49830e04 100644 --- a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_job_conf.json +++ b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.01, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -32,6 +35,14 @@ "decay_sqrt": false, "exposure_colname": "exposure" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_sparse_job_conf.json b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_sparse_job_conf.json index 4450d5ec82..81573fbced 100644 --- a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_sparse_job_conf.json +++ b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_train_sparse_job_conf.json @@ -27,6 +27,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.01, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -35,6 +38,14 @@ "decay_sqrt": false, "exposure_colname": "exposure" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_validate_job_conf.json b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_validate_job_conf.json index 26fd626ec3..f6cea5fa01 100644 --- a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_validate_job_conf.json +++ b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_validate_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.01, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -45,6 +48,14 @@ "use_first_metric_only": false, "save_freq": 1 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_warm_start_job_conf.json b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_warm_start_job_conf.json index d7ea51ee3c..b857250bde 100644 --- a/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_warm_start_job_conf.json +++ b/examples/dsl/v2/hetero_poisson_regression/test_hetero_poisson_warm_start_job_conf.json @@ -24,6 +24,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.01, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -49,6 +52,14 @@ "decay_sqrt": false, "exposure_colname": "exposure" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_binary_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_binary_conf.json index e19c04ed00..86b6666078 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_binary_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_binary_conf.json @@ -28,11 +28,20 @@ }, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_multi_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_multi_conf.json index 6dafc54375..f9fad598f0 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_multi_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_multi_conf.json @@ -28,11 +28,20 @@ }, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_regression_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_regression_conf.json index c3262b0d98..617c95c4f9 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_regression_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_cross_validation_regression_conf.json @@ -28,11 +28,20 @@ }, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_cipher_compress_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_cipher_compress_conf.json index 0a56f9787a..20140064ab 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_cipher_compress_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_cipher_compress_conf.json @@ -22,13 +22,22 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "cipher_compress_error": 8 }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_conf.json index b3b9e7a011..4c8af0a94f 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_conf.json @@ -22,12 +22,29 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_with_missing_value_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_with_missing_value_conf.json index 2b49c84f0b..e7cbe8cf72 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_with_missing_value_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_with_missing_value_conf.json @@ -22,13 +22,30 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "use_missing": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_without_cipher_compress_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_without_cipher_compress_conf.json index dbdc2449c1..96fbd092fe 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_without_cipher_compress_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_binary_without_cipher_compress_conf.json @@ -22,13 +22,30 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "cipher_compress": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_complete_secure_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_complete_secure_conf.json index b327167a43..37e0174294 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_complete_secure_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_complete_secure_conf.json @@ -22,13 +22,30 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "complete_secure": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_binary_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_binary_conf.json index 9bff26d4ec..a9eabeb159 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_binary_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_binary_conf.json @@ -22,13 +22,22 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "boosting_strategy": "layered" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_multi_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_multi_conf.json index ebbb5d990f..d191f5d93f 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_multi_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_layered_mode_multi_conf.json @@ -22,13 +22,22 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "boosting_strategy": "layered" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_binary_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_binary_conf.json index dfce62f2c5..7d66c65921 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_binary_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_binary_conf.json @@ -22,13 +22,22 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "boosting_strategy": "mix" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_multi_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_multi_conf.json index 20d71695ed..e22e78bd0b 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_multi_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_mix_mode_multi_conf.json @@ -22,13 +22,22 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 }, "boosting_strategy": "mix" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_conf.json index 25684c1591..90d96976a6 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_conf.json @@ -22,12 +22,29 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_with_mo_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_with_mo_conf.json index 468bf84f56..f1fba4b82e 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_with_mo_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_multi_with_mo_conf.json @@ -22,7 +22,8 @@ "num_trees": 5, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3, @@ -30,6 +31,14 @@ }, "multi_mode": "multi_output" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_conf.json index 823794e110..ff3a62108a 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_conf.json @@ -22,12 +22,29 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_multi_host_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_multi_host_conf.json index 4b7d544f41..f05028470b 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_multi_host_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_regression_multi_host_conf.json @@ -23,12 +23,29 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_with_early_stopping_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_with_early_stopping_conf.json index 279d3431ac..f66ae9c1e6 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_train_with_early_stopping_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_train_with_early_stopping_conf.json @@ -22,13 +22,30 @@ "num_trees": 3, "validation_freqs": 1, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "early_stopping_rounds": 1, "tree_param": { "max_depth": 3 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression" } diff --git a/examples/dsl/v2/hetero_secureboost/test_secureboost_warm_start_conf.json b/examples/dsl/v2/hetero_secureboost/test_secureboost_warm_start_conf.json index 00fb9f1518..2690fb58b9 100644 --- a/examples/dsl/v2/hetero_secureboost/test_secureboost_warm_start_conf.json +++ b/examples/dsl/v2/hetero_secureboost/test_secureboost_warm_start_conf.json @@ -55,7 +55,8 @@ }, "num_trees": 3, "encrypt_param": { - "method": "Paillier" + "method": "Paillier", + "key_length": 1024 }, "tree_param": { "max_depth": 3 @@ -80,6 +81,14 @@ "validation_freqs": 1 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_compute_loss_not_reveal_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_compute_loss_not_reveal_conf.json index 03c027bfac..4765be9eb9 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_compute_loss_not_reveal_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_compute_loss_not_reveal_conf.json @@ -57,6 +57,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros", "fit_intercept": true @@ -68,6 +71,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_conf.json index 9bc3069847..71db448948 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_conf.json @@ -57,6 +57,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -66,6 +69,14 @@ "decay_sqrt": false, "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_cv_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_cv_conf.json index ee7643028b..0163b66ed3 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_cv_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_cv_conf.json @@ -57,6 +57,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -70,6 +73,14 @@ }, "decay": 0.0, "decay_sqrt": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_encrypted_reveal_in_host_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_encrypted_reveal_in_host_conf.json index 6be8e3dfc4..bdd3a9bea3 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_encrypted_reveal_in_host_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_encrypted_reveal_in_host_conf.json @@ -57,6 +57,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -72,6 +75,14 @@ "decay_sqrt": false, "reveal_strategy": "encrypted_reveal_in_host", "reveal_every_iter": false + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_large_init_w_compute_loss_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_large_init_w_compute_loss_conf.json index e57c07ac00..bb82376eee 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_large_init_w_compute_loss_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_large_init_w_compute_loss_conf.json @@ -61,6 +61,9 @@ "optimizer": "sgd", "batch_size": 100, "learning_rate": 0.2, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "const", "init_const": 100 @@ -70,6 +73,14 @@ "decay": 0.0, "decay_sqrt": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_sample_weight_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_sample_weight_conf.json index 82db7b80db..a62f835a35 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_sample_weight_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_sample_weight_conf.json @@ -64,6 +64,9 @@ "optimizer": "rmsprop", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -74,6 +77,14 @@ "reveal_every_iter": true, "reveal_strategy": "respectively" }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "regression", "pos_label": 1 diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_validate_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_validate_conf.json index 6e25a16da8..91e0035909 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_validate_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_validate_conf.json @@ -78,6 +78,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -101,6 +104,22 @@ "save_freq": 1, "use_first_metric_only": false } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_warm_start_conf.json b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_warm_start_conf.json index d687791960..5fbf220d82 100644 --- a/examples/dsl/v2/hetero_sshe_linr/hetero_linr_warm_start_conf.json +++ b/examples/dsl/v2/hetero_sshe_linr/hetero_linr_warm_start_conf.json @@ -50,9 +50,6 @@ } }, "common": { - "intersection_0": { - "only_output_key": false - }, "hetero_linr_0": { "penalty": "L2", "tol": 0.001, @@ -60,6 +57,9 @@ "optimizer": "sgd", "batch_size": -1, "learning_rate": 0.15, + "encrypt_param": { + "key_length": 1024 + }, "init_param": { "init_method": "zeros" }, @@ -84,8 +84,16 @@ "early_stop": "weight_diff", "decay": 0.0, "decay_sqrt": false, - "encrypted_mode_calculator_param": { - "mode": "fast" + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 } }, "evaluation_0": { diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_conf.json index b4d54741b5..0e9cec6cb3 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_not_reveal_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_not_reveal_conf.json index b8cd4de97c..2f95c92b8a 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_not_reveal_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_compute_loss_not_reveal_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_encrypted_not_reveal_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_encrypted_not_reveal_conf.json index ba0eb533a8..df028c14c8 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_encrypted_not_reveal_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_encrypted_not_reveal_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "encrypted_reveal_in_host", "reveal_every_iter": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_respectively_not_reveal_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_respectively_not_reveal_conf.json index ba111e950e..0a29e76421 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_respectively_not_reveal_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_converged_weight_diff_respectively_not_reveal_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_cv_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_cv_conf.json index f8e17be432..d6f6527193 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_cv_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_cv_conf.json @@ -69,6 +69,14 @@ "random_seed": 103, "need_cv": true } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } } } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_encrypted_reveal_in_host_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_encrypted_reveal_in_host_conf.json index fe35759835..ab4094c253 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_encrypted_reveal_in_host_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_encrypted_reveal_in_host_conf.json @@ -70,6 +70,9 @@ }, "max_iter": 30, "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": "encrypted_reveal_in_host", "reveal_every_iter": false }, diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_l1_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_l1_conf.json index 276084cc45..5590bfea9e 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_l1_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_l1_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_large_init_w_compute_loss_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_large_init_w_compute_loss_conf.json index edc2e72968..ab156278c5 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_large_init_w_compute_loss_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_large_init_w_compute_loss_conf.json @@ -63,6 +63,14 @@ }, "decay": 0.5 }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_conf.json index 0a99121658..f4d44e09d7 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_not_fit_intercept_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_not_fit_intercept_conf.json index 5a1d423689..2c51f9c8d1 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_not_fit_intercept_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_normal_not_fit_intercept_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_conf.json index 658739d334..921d9b56b3 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_encrypted_reveal_in_host_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_encrypted_reveal_in_host_conf.json index 86d65490ab..2a4b1e7df2 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_encrypted_reveal_in_host_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_encrypted_reveal_in_host_conf.json @@ -85,9 +85,20 @@ }, "max_iter": 1, "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": "encrypted_reveal_in_host", "reveal_every_iter": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_l1_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_l1_conf.json index 15014c01db..adf0cfcfbe 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_l1_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_l1_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_none_penalty_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_none_penalty_conf.json index 0dcc81e821..c0ce5f4962 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_none_penalty_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_ovr_none_penalty_conf.json @@ -64,6 +64,14 @@ "reveal_strategy": "respectively", "reveal_every_iter": false }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "multi" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_warm_start_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_warm_start_conf.json index 2b09234930..0ca6f726cb 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_warm_start_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_warm_start_conf.json @@ -99,6 +99,14 @@ "save_freq": 1 } }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_with_validate_conf.json b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_with_validate_conf.json index 00baaaa9d1..bf2ff149e3 100644 --- a/examples/dsl/v2/hetero_sshe_lr/hetero_lr_with_validate_conf.json +++ b/examples/dsl/v2/hetero_sshe_lr/hetero_lr_with_validate_conf.json @@ -72,6 +72,9 @@ }, "max_iter": 30, "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + }, "callback_param": { "callbacks": [ "EarlyStopping", @@ -83,6 +86,22 @@ "reveal_strategy": "respectively", "reveal_every_iter": true }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, + "intersection_1": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } + }, "evaluation_0": { "eval_type": "binary" } diff --git a/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_linr_conf.json b/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_linr_conf.json index 66992f00e6..ae61b9259f 100644 --- a/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_linr_conf.json +++ b/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_linr_conf.json @@ -31,6 +31,9 @@ }, "max_iter": 3, "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + }, "stepwise_param": { "score_name": "AIC", "direction": "backward", @@ -38,6 +41,14 @@ "max_step": 3, "nvmin": 2 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_lr_conf.json b/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_lr_conf.json index e61db27004..1bb1614b86 100644 --- a/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_lr_conf.json +++ b/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_lr_conf.json @@ -28,6 +28,9 @@ }, "max_iter": 5, "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + }, "decay": 0.0, "decay_sqrt": false, "stepwise_param": { @@ -37,6 +40,14 @@ "max_step": 2, "nvmin": 2 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_poisson_conf.json b/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_poisson_conf.json index 35f06ccc65..0fa492047f 100644 --- a/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_poisson_conf.json +++ b/examples/dsl/v2/hetero_stepwise/test_hetero_stepwise_poisson_conf.json @@ -27,6 +27,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff", "decay": 0.0, @@ -38,6 +41,14 @@ "max_step": 1, "nvmin": 2 } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/intersect/test_intersect_job_rsa_fraction_conf.json b/examples/dsl/v2/intersect/test_intersect_job_rsa_fraction_conf.json index c4dbaacb11..10325a9cab 100644 --- a/examples/dsl/v2/intersect/test_intersect_job_rsa_fraction_conf.json +++ b/examples/dsl/v2/intersect/test_intersect_job_rsa_fraction_conf.json @@ -22,7 +22,8 @@ "hash_method": "sha256", "final_hash_method": "sha256", "split_calculation": false, - "random_base_fraction": 0.5 + "random_base_fraction": 0.5, + "key_length": 2048 } } }, diff --git a/examples/dsl/v2/intersect/test_intersect_job_rsa_multi_host_conf.json b/examples/dsl/v2/intersect/test_intersect_job_rsa_multi_host_conf.json index 6a168a6280..03ee1a328d 100644 --- a/examples/dsl/v2/intersect/test_intersect_job_rsa_multi_host_conf.json +++ b/examples/dsl/v2/intersect/test_intersect_job_rsa_multi_host_conf.json @@ -22,7 +22,8 @@ "rsa_params": { "hash_method": "sha256", "final_hash_method": "sha256", - "split_calculation": false + "split_calculation": false, + "key_length": 2048 } } }, diff --git a/examples/dsl/v2/intersect/test_intersect_job_rsa_split_conf.json b/examples/dsl/v2/intersect/test_intersect_job_rsa_split_conf.json index 189d0e2ef5..7d83dc684b 100644 --- a/examples/dsl/v2/intersect/test_intersect_job_rsa_split_conf.json +++ b/examples/dsl/v2/intersect/test_intersect_job_rsa_split_conf.json @@ -22,7 +22,8 @@ "hash_method": "sha256", "final_hash_method": "sha256", "split_calculation": true, - "random_base_fraction": 0.5 + "random_base_fraction": 0.5, + "key_length": 2048 } } }, diff --git a/examples/dsl/v2/label_transform/label_transform_conf.json b/examples/dsl/v2/label_transform/label_transform_conf.json index e9e59475d3..cb0555ff95 100644 --- a/examples/dsl/v2/label_transform/label_transform_conf.json +++ b/examples/dsl/v2/label_transform/label_transform_conf.json @@ -33,7 +33,18 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "binary" diff --git a/examples/dsl/v2/label_transform/label_transform_encoder_conf.json b/examples/dsl/v2/label_transform/label_transform_encoder_conf.json index 1c009d199e..7438507833 100644 --- a/examples/dsl/v2/label_transform/label_transform_encoder_conf.json +++ b/examples/dsl/v2/label_transform/label_transform_encoder_conf.json @@ -33,7 +33,18 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "label_transform_0": { "label_encoder": { diff --git a/examples/dsl/v2/label_transform/label_transform_encoder_partial_conf.json b/examples/dsl/v2/label_transform/label_transform_encoder_partial_conf.json index 07c5a8092c..4dee1ea401 100644 --- a/examples/dsl/v2/label_transform/label_transform_encoder_partial_conf.json +++ b/examples/dsl/v2/label_transform/label_transform_encoder_partial_conf.json @@ -33,7 +33,18 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "label_transform_0": { "label_encoder": { diff --git a/examples/dsl/v2/label_transform/label_transform_encoder_without_label_list_conf.json b/examples/dsl/v2/label_transform/label_transform_encoder_without_label_list_conf.json index a553a02664..61b8ad68c2 100644 --- a/examples/dsl/v2/label_transform/label_transform_encoder_without_label_list_conf.json +++ b/examples/dsl/v2/label_transform/label_transform_encoder_without_label_list_conf.json @@ -33,7 +33,18 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "label_transform_0": { "label_encoder": { diff --git a/examples/dsl/v2/local_baseline/test_local_baseline_job_conf.json b/examples/dsl/v2/local_baseline/test_local_baseline_job_conf.json index 321666a8c8..e04aac1789 100755 --- a/examples/dsl/v2/local_baseline/test_local_baseline_job_conf.json +++ b/examples/dsl/v2/local_baseline/test_local_baseline_job_conf.json @@ -20,7 +20,12 @@ "intersection_0": { "intersect_method": "rsa", "sync_intersect_ids": true, - "only_output_key": false + "only_output_key": false, + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_lr_0": { "penalty": "L2", @@ -33,7 +38,10 @@ "init_method": "zeros" }, "max_iter": 30, - "early_stop": "diff" + "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + } }, "local_baseline_0": { "model_name": "LogisticRegression", diff --git a/examples/dsl/v2/local_baseline/test_local_baseline_sample_weight_job_conf.json b/examples/dsl/v2/local_baseline/test_local_baseline_sample_weight_job_conf.json index f8b3da0104..3a7f2209e1 100755 --- a/examples/dsl/v2/local_baseline/test_local_baseline_sample_weight_job_conf.json +++ b/examples/dsl/v2/local_baseline/test_local_baseline_sample_weight_job_conf.json @@ -20,7 +20,12 @@ "intersection_0": { "intersect_method": "rsa", "sync_intersect_ids": true, - "only_output_key": false + "only_output_key": false, + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_lr_0": { "penalty": "L2", @@ -33,7 +38,10 @@ "init_method": "zeros" }, "max_iter": 30, - "early_stop": "diff" + "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + } }, "local_baseline_0": { "model_name": "LogisticRegression", diff --git a/examples/dsl/v2/model_loader/binning_train_conf.json b/examples/dsl/v2/model_loader/binning_train_conf.json index b694d046c3..41817d3dd4 100644 --- a/examples/dsl/v2/model_loader/binning_train_conf.json +++ b/examples/dsl/v2/model_loader/binning_train_conf.json @@ -58,6 +58,9 @@ "bin_names": null, "category_indexes": null, "category_names": null, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": [ 0, diff --git a/examples/dsl/v2/multi_model_pipeline/test_multi_pipeline_conf.json b/examples/dsl/v2/multi_model_pipeline/test_multi_pipeline_conf.json index 9bb7525cb7..e2d135f645 100644 --- a/examples/dsl/v2/multi_model_pipeline/test_multi_pipeline_conf.json +++ b/examples/dsl/v2/multi_model_pipeline/test_multi_pipeline_conf.json @@ -42,7 +42,10 @@ "init_method": "random_uniform" }, "max_iter": 10, - "early_stop": "diff" + "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + } }, "hetero_lr_1": { "penalty": "L2", @@ -56,6 +59,9 @@ }, "max_iter": 10, "early_stop": "diff", + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 5, "shuffle": true, @@ -68,10 +74,24 @@ "cv_param": { "shuffle": false, "need_cv": true + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_secureboost_1": { - "num_trees": 5 + "num_trees": 5, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_lr_conf.json b/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_lr_conf.json index 5cc480d257..bcfb6db2ce 100755 --- a/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_lr_conf.json +++ b/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_lr_conf.json @@ -21,14 +21,28 @@ "output_format": "dense" }, "hetero_lr_0": { - "max_iter": 2 + "max_iter": 2, + "encrypt_param": { + "key_length": 1024 + } }, "positive_unlabeled_0": { "strategy": "proportion", "threshold": 0.1 }, "hetero_lr_1": { - "max_iter": 1 + "max_iter": 1, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sbt_conf.json b/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sbt_conf.json index c46b105c14..a1107da9c1 100755 --- a/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sbt_conf.json +++ b/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sbt_conf.json @@ -25,6 +25,9 @@ "num_trees": 2, "tree_param": { "max_depth": 3 + }, + "encrypt_param": { + "key_length": 1024 } }, "positive_unlabeled_0": { @@ -39,6 +42,17 @@ "num_trees": 1, "tree_param": { "max_depth": 2 + }, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 } } }, diff --git a/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sshe_lr_conf.json b/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sshe_lr_conf.json index 81a54fc780..e5a47020c5 100755 --- a/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sshe_lr_conf.json +++ b/examples/dsl/v2/positive_unlabeled/test_positive_unlabeled_sshe_lr_conf.json @@ -18,14 +18,28 @@ "output_format": "dense" }, "hetero_sshe_lr_0": { - "max_iter": 2 + "max_iter": 2, + "encrypt_param": { + "key_length": 1024 + } }, "positive_unlabeled_0": { "strategy": "probability", "threshold": 0.9 }, "hetero_sshe_lr_1": { - "max_iter": 1 + "max_iter": 1, + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/sample_weight/sample_weight_balanced_job_conf.json b/examples/dsl/v2/sample_weight/sample_weight_balanced_job_conf.json index d9810ea132..0a2aaad429 100644 --- a/examples/dsl/v2/sample_weight/sample_weight_balanced_job_conf.json +++ b/examples/dsl/v2/sample_weight/sample_weight_balanced_job_conf.json @@ -27,7 +27,18 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "binary", diff --git a/examples/dsl/v2/sample_weight/sample_weight_class_dict_feature_engineering_job_conf.json b/examples/dsl/v2/sample_weight/sample_weight_class_dict_feature_engineering_job_conf.json index f388718458..fb1b881970 100644 --- a/examples/dsl/v2/sample_weight/sample_weight_class_dict_feature_engineering_job_conf.json +++ b/examples/dsl/v2/sample_weight/sample_weight_class_dict_feature_engineering_job_conf.json @@ -27,7 +27,10 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "binary", @@ -64,6 +67,14 @@ "feature_scale_0": { "method": "standard_scale", "need_run": true + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } } }, "role": { diff --git a/examples/dsl/v2/sample_weight/sample_weight_multi_host_job_conf.json b/examples/dsl/v2/sample_weight/sample_weight_multi_host_job_conf.json index 9ce405dfae..845e07357c 100644 --- a/examples/dsl/v2/sample_weight/sample_weight_multi_host_job_conf.json +++ b/examples/dsl/v2/sample_weight/sample_weight_multi_host_job_conf.json @@ -28,7 +28,18 @@ "init_method": "zeros" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "binary", diff --git a/examples/dsl/v2/sample_weight/sample_weight_name_job_conf.json b/examples/dsl/v2/sample_weight/sample_weight_name_job_conf.json index 01b94d4ebf..7863e13c93 100644 --- a/examples/dsl/v2/sample_weight/sample_weight_name_job_conf.json +++ b/examples/dsl/v2/sample_weight/sample_weight_name_job_conf.json @@ -27,7 +27,18 @@ "init_method": "random_uniform" }, "max_iter": 20, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "binary", diff --git a/examples/dsl/v2/scorecard/test_scorecard_job_conf.json b/examples/dsl/v2/scorecard/test_scorecard_job_conf.json index 7b8b9f410f..c1b1ca8f30 100644 --- a/examples/dsl/v2/scorecard/test_scorecard_job_conf.json +++ b/examples/dsl/v2/scorecard/test_scorecard_job_conf.json @@ -20,7 +20,12 @@ "intersection_0": { "intersect_method": "rsa", "sync_intersect_ids": true, - "only_output_key": false + "only_output_key": false, + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_lr_0": { "penalty": "L2", @@ -34,6 +39,9 @@ }, "max_iter": 5, "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/dsl/v2/secure_information_retrieval/secure_information_retrieval_testsuite.json b/examples/dsl/v2/secure_information_retrieval/secure_information_retrieval_testsuite.json deleted file mode 100644 index 12f827d173..0000000000 --- a/examples/dsl/v2/secure_information_retrieval/secure_information_retrieval_testsuite.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "data": [ - { - "file": "examples/data/breast_hetero_guest.csv", - "head": 1, - "partition": 16, - "table_name": "breast_hetero_guest", - "namespace": "experiment", - "role": "host_0" - }, - { - "file": "examples/data/breast_hetero_host.csv", - "head": 1, - "partition": 16, - "table_name": "breast_hetero_host", - "namespace": "experiment", - "role": "guest_0" - } - ], - "tasks": { - "secure-information-retrieval": { - "conf": "test_secure_information_retrieval_conf.json", - "dsl": "test_secure_information_retrieval_dsl.json" - } - } -} \ No newline at end of file diff --git a/examples/dsl/v2/union/test_union_job_conf.json b/examples/dsl/v2/union/test_union_job_conf.json index cc5c9c18d8..7b5ada2223 100644 --- a/examples/dsl/v2/union/test_union_job_conf.json +++ b/examples/dsl/v2/union/test_union_job_conf.json @@ -26,7 +26,20 @@ "init_method": "random_uniform" }, "max_iter": 30, - "early_stop": "weight_diff" + "early_stop": "weight_diff", + "encrypt_param": { + "key_length": 1024 + } + }, + "intersection_0": { + "intersect_method": "rsa", + "sync_intersect_ids": true, + "only_output_key": false, + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "evaluation_0": { "eval_type": "binary", diff --git a/examples/experiment_template/dsl/v2/column_expand/test_column_expand_train_job_conf.json b/examples/experiment_template/dsl/v2/column_expand/test_column_expand_train_job_conf.json index 0aa377070d..1f1582e4ea 100644 --- a/examples/experiment_template/dsl/v2/column_expand/test_column_expand_train_job_conf.json +++ b/examples/experiment_template/dsl/v2/column_expand/test_column_expand_train_job_conf.json @@ -35,6 +35,9 @@ "bin_num": 10, "bin_indexes": -1, "local_only": false, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_type": "bin_num" @@ -74,6 +77,9 @@ "init_param": { "init_method": "random_uniform" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 10, "early_stop": "diff", "cv_param": { diff --git a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_job_conf.json b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_job_conf.json index 238182b254..997244698b 100644 --- a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_job_conf.json @@ -18,10 +18,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -29,6 +39,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -91,6 +104,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff", "validation_freqs": null, diff --git a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_manually_job_conf.json b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_manually_job_conf.json index 64bea9e0ed..e4f014cee4 100644 --- a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_manually_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_manually_job_conf.json @@ -18,10 +18,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -29,6 +39,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -102,6 +115,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff", "validation_freqs": null, diff --git a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_pearson_job_conf.json b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_pearson_job_conf.json index a29f1a86e5..c355141470 100644 --- a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_pearson_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_pearson_job_conf.json @@ -18,10 +18,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -29,6 +39,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { diff --git a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_sample_job_conf.json b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_sample_job_conf.json index 216306dd9e..0ee7fa62a3 100644 --- a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_sample_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_sample_job_conf.json @@ -18,7 +18,12 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "sample_0": { "mode": "stratified", @@ -36,7 +41,12 @@ "need_run": true }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -44,6 +54,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -106,6 +119,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff", "validation_freqs": null, diff --git a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_union_job_conf.json b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_union_job_conf.json index 06b5949753..a0e99bba1d 100644 --- a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_union_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_union_job_conf.json @@ -28,6 +28,9 @@ "bin_indexes": -1, "optimal_binning_param": { "metric_method": "iv" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -91,7 +94,10 @@ "penalty": "L2", "max_iter": 5, "validation_freqs": null, - "early_stopping_rounds": null + "early_stopping_rounds": null, + "encrypt_param": { + "key_length": 1024 + } } }, "role": { diff --git a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_verify_job_conf.json b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_verify_job_conf.json index 912eb0f454..d85778dafb 100644 --- a/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_verify_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_lr/test_hetero_lr_train_verify_job_conf.json @@ -18,13 +18,28 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_2": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -32,6 +47,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -94,6 +112,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 5, "early_stop": "diff", "validation_freqs": null, diff --git a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_job_conf.json b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_job_conf.json index 872debce98..ce5df1cf2b 100644 --- a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_job_conf.json @@ -20,10 +20,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -106,7 +116,8 @@ "ks" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_manually_job_conf.json b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_manually_job_conf.json index 14f2f80fdc..b5442df11b 100644 --- a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_manually_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_manually_job_conf.json @@ -20,10 +20,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -31,6 +41,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -117,7 +130,8 @@ "ks" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_one_hot_job_conf.json b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_one_hot_job_conf.json index 61de98e533..3c8d615c46 100644 --- a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_one_hot_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_one_hot_job_conf.json @@ -20,10 +20,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -31,6 +41,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -106,7 +119,8 @@ "ks" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_pearson_job_conf.json b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_pearson_job_conf.json index bc9d060ccb..d85a0f43bc 100644 --- a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_pearson_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_pearson_job_conf.json @@ -20,10 +20,20 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -31,6 +41,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -109,7 +122,8 @@ "ks" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_union_job_conf.json b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_union_job_conf.json index e62dc85cf6..e0d814aed8 100644 --- a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_union_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_union_job_conf.json @@ -31,6 +31,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -106,7 +109,8 @@ "ks" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_verify_job_conf.json b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_verify_job_conf.json index 0448d2b880..67e0ebaabf 100644 --- a/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_verify_job_conf.json +++ b/examples/experiment_template/dsl/v2/hetero_secureboost/test_hetero_secureboost_train_verify_job_conf.json @@ -20,13 +20,28 @@ "component_parameters": { "common": { "intersection_0": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_1": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "intersection_2": { - "intersect_method": "raw" + "intersect_method": "rsa", + "rsa_params": { + "hash_method": "sha256", + "final_hash_method": "sha256", + "key_length": 1024 + } }, "hetero_feature_binning_0": { "method": "optimal", @@ -34,6 +49,9 @@ "optimal_binning_param": { "metric_method": "iv", "init_bucket_method": "quantile" + }, + "encrypt_param": { + "key_length": 1024 } }, "hetero_feature_selection_0": { @@ -109,7 +127,8 @@ "ks" ], "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "early_stopping_rounds": 5, "tree_param": { diff --git a/examples/experiment_template/dsl/v2/union/test_union_validate_job_conf.json b/examples/experiment_template/dsl/v2/union/test_union_validate_job_conf.json index 9fac06ef1f..b8a5a08bca 100644 --- a/examples/experiment_template/dsl/v2/union/test_union_validate_job_conf.json +++ b/examples/experiment_template/dsl/v2/union/test_union_validate_job_conf.json @@ -35,6 +35,9 @@ "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "max_iter": 30, "early_stop": "diff", "cv_param": { diff --git a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_lr.py b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_lr.py index 7e118c9e8c..67b7a33a84 100644 --- a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_lr.py +++ b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_lr.py @@ -93,8 +93,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -103,6 +109,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -147,6 +156,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "validation_freqs": None, "early_stopping_rounds": None } diff --git a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_manually_lr.py b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_manually_lr.py index 1cafff0f75..8eeb30b20a 100644 --- a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_manually_lr.py +++ b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_manually_lr.py @@ -93,8 +93,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -103,6 +109,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -151,6 +160,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "validation_freqs": None, "early_stopping_rounds": None } diff --git a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_pearson_lr.py b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_pearson_lr.py index ac18e6e512..56deed40c4 100644 --- a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_pearson_lr.py +++ b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_pearson_lr.py @@ -94,8 +94,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -104,6 +110,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -150,6 +159,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "validation_freqs": None, "early_stopping_rounds": None } diff --git a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_sample_lr.py b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_sample_lr.py index dd291bbb7a..41e17dbe47 100644 --- a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_sample_lr.py +++ b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_sample_lr.py @@ -94,8 +94,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { 'name': 'sample_0', @@ -112,6 +118,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -156,6 +165,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "validation_freqs": None, "early_stopping_rounds": None } diff --git a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_test_lr.py b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_test_lr.py index fec6712646..2f1a138c36 100644 --- a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_test_lr.py +++ b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_test_lr.py @@ -101,9 +101,18 @@ def main(config="../../config.yaml", namespace=""): data_transform_2.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") - intersection_2 = Intersection(name="intersection_2", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_2 = Intersection( + name="intersection_2", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -112,6 +121,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -158,6 +170,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "validation_freqs": None, "early_stopping_rounds": None } diff --git a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_union_lr.py b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_union_lr.py index 5da06a8a01..d326b3e8f1 100644 --- a/examples/experiment_template/pipeline/hetero_lr/pipeline_train_union_lr.py +++ b/examples/experiment_template/pipeline/hetero_lr/pipeline_train_union_lr.py @@ -103,8 +103,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -112,6 +118,9 @@ def main(config="../../config.yaml", namespace=""): "optimal_binning_param": { "metric_method": "iv" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -149,7 +158,10 @@ def main(config="../../config.yaml", namespace=""): "penalty": "L2", "validation_freqs": None, "early_stopping_rounds": None, - "max_iter": 5 + "max_iter": 5, + "encrypt_param": { + "key_length": 1024 + }, } hetero_lr_0 = HeteroLR(name='hetero_lr_0', **param) diff --git a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_manually_sbt.py b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_manually_sbt.py index 41344840c6..a76374c723 100644 --- a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_manually_sbt.py +++ b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_manually_sbt.py @@ -91,8 +91,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -101,6 +107,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -144,7 +153,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_one_hot_sbt.py b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_one_hot_sbt.py index 683e58c0b8..19f6c90479 100644 --- a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_one_hot_sbt.py +++ b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_one_hot_sbt.py @@ -92,8 +92,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -102,6 +108,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -147,7 +156,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_pearson_sbt.py b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_pearson_sbt.py index 43384850ab..f99cbad197 100644 --- a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_pearson_sbt.py +++ b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_pearson_sbt.py @@ -92,8 +92,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -102,6 +108,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -143,7 +152,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_sbt.py b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_sbt.py index 081428b703..f04b68e9c5 100644 --- a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_sbt.py +++ b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_sbt.py @@ -91,8 +91,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -101,6 +107,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -140,7 +149,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_test_sbt.py b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_test_sbt.py index dd6bd92fc6..7d98fcd61b 100644 --- a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_test_sbt.py +++ b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_test_sbt.py @@ -99,9 +99,18 @@ def main(config="../../config.yaml", namespace=""): data_transform_2.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="raw") - intersection_1 = Intersection(name="intersection_1", intersect_method="raw") - intersection_2 = Intersection(name="intersection_2", intersect_method="raw") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_2 = Intersection( + name="intersection_2", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -110,6 +119,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -150,7 +162,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_union_sbt.py b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_union_sbt.py index 811550c370..41cf805ac6 100644 --- a/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_union_sbt.py +++ b/examples/experiment_template/pipeline/hetero_secureboost/pipeline_train_union_sbt.py @@ -101,8 +101,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='host', party_id=host).component_param(**param) # define Intersection components - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "name": 'hetero_feature_binning_0', @@ -111,6 +117,9 @@ def main(config="../../config.yaml", namespace=""): "metric_method": "iv", "init_bucket_method": "quantile" }, + "encrypt_param": { + "key_length": 1024 + }, "bin_indexes": -1 } hetero_feature_binning_0 = HeteroFeatureBinning(**param) @@ -150,7 +159,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/pipeline/data_split/pipeline-hetero-data-split-multi-model.py b/examples/pipeline/data_split/pipeline-hetero-data-split-multi-model.py index 9a61cb9651..f981271ba4 100644 --- a/examples/pipeline/data_split/pipeline-hetero-data-split-multi-model.py +++ b/examples/pipeline/data_split/pipeline-hetero-data-split-multi-model.py @@ -56,13 +56,17 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) hetero_data_split_0 = HeteroDataSplit(name="hetero_data_split_0", stratified=False, test_size=0.3, validate_size=0.2) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=10, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, - init_param={"init_method": "zeros"}) + init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}) hetero_linr_1 = HeteroLinR() pipeline.add_component(reader_0) diff --git a/examples/pipeline/data_split/pipeline-hetero-data-split.py b/examples/pipeline/data_split/pipeline-hetero-data-split.py index 32386e566d..8b30c6267d 100644 --- a/examples/pipeline/data_split/pipeline-hetero-data-split.py +++ b/examples/pipeline/data_split/pipeline-hetero-data-split.py @@ -55,13 +55,17 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) hetero_data_split_0 = HeteroDataSplit(name="hetero_data_split_0", stratified=True, test_size=0.3, split_points=[0.0, 0.2]) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=10, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, - init_param={"init_method": "zeros"}) + init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) diff --git a/examples/pipeline/data_statistics/pipeline-data-statistics-all-columns.py b/examples/pipeline/data_statistics/pipeline-data-statistics-all-columns.py index 926c337c53..f6f9e02282 100644 --- a/examples/pipeline/data_statistics/pipeline-data-statistics-all-columns.py +++ b/examples/pipeline/data_statistics/pipeline-data-statistics-all-columns.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-missing.py b/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-missing.py index 6fb2a8b1df..5ee7ebdee9 100644 --- a/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-missing.py +++ b/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-missing.py @@ -71,7 +71,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-name.py b/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-name.py index 4a84dd2cd8..3246837c85 100644 --- a/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-name.py +++ b/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column-name.py @@ -71,7 +71,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column.py b/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column.py index 1ea80cbe4b..5d1086cdf6 100644 --- a/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column.py +++ b/examples/pipeline/data_statistics/pipeline-data-statistics-partial-column.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/demo/pipeline-deploy-demo.py b/examples/pipeline/demo/pipeline-deploy-demo.py index 22262bb69a..f3d5c61c61 100644 --- a/examples/pipeline/demo/pipeline-deploy-demo.py +++ b/examples/pipeline/demo/pipeline-deploy-demo.py @@ -61,7 +61,10 @@ def main(): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) # define HeteroLR component hetero_lr_0 = HeteroLR(name="hetero_lr_0", @@ -69,7 +72,8 @@ def main(): learning_rate=0.15, optimizer="rmsprop", max_iter=10, - callback_param={"callbacks": ["ModelCheckpoint"]}) + callback_param={"callbacks": ["ModelCheckpoint"]}, + encrypt_param={"key_length": 1024}) # add components to pipeline, in order of task execution pipeline.add_component(reader_0) diff --git a/examples/pipeline/demo/pipeline-mini-demo.py b/examples/pipeline/demo/pipeline-mini-demo.py index 01e50bfd65..fca89d3ed6 100644 --- a/examples/pipeline/demo/pipeline-mini-demo.py +++ b/examples/pipeline/demo/pipeline-mini-demo.py @@ -61,14 +61,18 @@ def main(): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) # define HeteroLR component hetero_lr_0 = HeteroLR(name="hetero_lr_0", early_stop="diff", learning_rate=0.15, optimizer="rmsprop", - max_iter=10) + max_iter=10, + encrypt_param={"key_length": 1024}) # add components to pipeline, in order of task execution pipeline.add_component(reader_0) diff --git a/examples/pipeline/demo/pipeline-quick-demo.py b/examples/pipeline/demo/pipeline-quick-demo.py index 9e40bca0f8..ab589c075e 100644 --- a/examples/pipeline/demo/pipeline-quick-demo.py +++ b/examples/pipeline/demo/pipeline-quick-demo.py @@ -43,7 +43,10 @@ data_transform_0.get_party_instance(role="host", party_id=10000).component_param(with_label=False) # Perform PSI for hetero-scenario. -intersect_0 = Intersection(name="intersection_0") +intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) # Define a hetero-secureboost component. The following parameters will be set for all parties involved. hetero_secureboost_0 = HeteroSecureBoost(name="hetero_secureboost_0", @@ -51,7 +54,7 @@ bin_num=16, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "paillier"}, + encrypt_param={"method": "paillier", "key_length": 1024}, tree_param={"max_depth": 3}) # To show the evaluation result, an "Evaluation" component is needed. diff --git a/examples/pipeline/feature_imputation/pipeline-feature-imputation-column-method.py b/examples/pipeline/feature_imputation/pipeline-feature-imputation-column-method.py index 838707d9f9..333eadebb8 100644 --- a/examples/pipeline/feature_imputation/pipeline-feature-imputation-column-method.py +++ b/examples/pipeline/feature_imputation/pipeline-feature-imputation-column-method.py @@ -43,7 +43,11 @@ def main(config="../../config.yaml", namespace=""): data_transform_0 = DataTransform(name="data_transform_0", with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) + feature_imputation_0 = FeatureImputation(name="feature_imputation_0", default_value=42, missing_impute=[0]) diff --git a/examples/pipeline/feature_imputation/pipeline-feature-imputation-designated.py b/examples/pipeline/feature_imputation/pipeline-feature-imputation-designated.py index 3cc60cc245..bb89a5e909 100644 --- a/examples/pipeline/feature_imputation/pipeline-feature-imputation-designated.py +++ b/examples/pipeline/feature_imputation/pipeline-feature-imputation-designated.py @@ -43,7 +43,11 @@ def main(config="../../config.yaml", namespace=""): data_transform_0 = DataTransform(name="data_transform_0", with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) + feature_imputation_0 = FeatureImputation(name="feature_imputation_0", missing_fill_method="designated", default_value=42, missing_impute=[0]) diff --git a/examples/pipeline/feature_imputation/pipeline-feature-imputation-method.py b/examples/pipeline/feature_imputation/pipeline-feature-imputation-method.py index 912acddbbc..46c32aae99 100644 --- a/examples/pipeline/feature_imputation/pipeline-feature-imputation-method.py +++ b/examples/pipeline/feature_imputation/pipeline-feature-imputation-method.py @@ -43,7 +43,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0 = DataTransform(name="data_transform_0", with_label=False, output_format="dense") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) feature_imputation_0 = FeatureImputation(name="feature_imputation_0", missing_fill_method="max", missing_impute=[0]) feature_imputation_1 = FeatureImputation(name="feature_imputation_1") diff --git a/examples/pipeline/feature_scale/pipeline-feature-scale-cap.py b/examples/pipeline/feature_scale/pipeline-feature-scale-cap.py index 3448b4120e..9bafbcba8d 100644 --- a/examples/pipeline/feature_scale/pipeline-feature-scale-cap.py +++ b/examples/pipeline/feature_scale/pipeline-feature-scale-cap.py @@ -58,16 +58,19 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, missing_fill=True, outlier_replace=True) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) federated_sample_0 = FederatedSample(name="federated_sample_0", mode="stratified", method="upsample", fractions=[[0, 1.5], [1, 2.0]]) feature_scale_0 = FeatureScale(name="feature_scale_0", method="min_max_scale", mode="cap", feat_upper=1, feat_lower=0) - hetero_feature_binning_0 = HeteroFeatureBinning(name="hetero_feature_binning_0") + hetero_feature_binning_0 = HeteroFeatureBinning(name="hetero_feature_binning_0", encrypt_param={"key_length": 1024}) hetero_feature_selection_0 = HeteroFeatureSelection(name="hetero_feature_selection_0") one_hot_0 = OneHotEncoder(name="one_hot_0") hetero_lr_0 = HeteroLR(name="hetero_lr_0", penalty="L2", optimizer="rmsprop", tol=1e-5, - init_param={"init_method": "random_uniform"}, + init_param={"init_method": "random_uniform"}, encrypt_param={"key_length": 1024}, alpha=0.01, max_iter=10, early_stop="diff", batch_size=320, learning_rate=0.15) evaluation_0 = Evaluation(name="evaluation_0") diff --git a/examples/pipeline/feature_scale/pipeline-feature-scale-normal.py b/examples/pipeline/feature_scale/pipeline-feature-scale-normal.py index e0ed68a126..d5ede58b08 100644 --- a/examples/pipeline/feature_scale/pipeline-feature-scale-normal.py +++ b/examples/pipeline/feature_scale/pipeline-feature-scale-normal.py @@ -58,7 +58,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, missing_fill=True, outlier_replace=True) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 2048}) federated_sample_0 = FederatedSample(name="federated_sample_0", mode="stratified", method="upsample", fractions=[[0, 1.5], [1, 2.0]]) feature_scale_0 = FeatureScale(name="feature_scale_0", method="min_max_scale", mode="normal") @@ -66,11 +69,11 @@ def main(config="../../config.yaml", namespace=""): role='guest', party_id=guest).component_param( feat_upper=[ 1, 2, 1, 1, 0.5, 1, 2, 2, 1, 1]) - hetero_feature_binning_0 = HeteroFeatureBinning(name="hetero_feature_binning_0") + hetero_feature_binning_0 = HeteroFeatureBinning(name="hetero_feature_binning_0", encrypt_param={"key_length": 1024}) hetero_feature_selection_0 = HeteroFeatureSelection(name="hetero_feature_selection_0") one_hot_0 = OneHotEncoder(name="one_hot_0") hetero_lr_0 = HeteroLR(name="hetero_lr_0", penalty="L2", optimizer="rmsprop", tol=1e-5, - init_param={"init_method": "random_uniform"}, + init_param={"init_method": "random_uniform"}, encrypt_param={"key_length": 1024}, alpha=0.01, max_iter=10, early_stop="diff", batch_size=320, learning_rate=0.15) evaluation_0 = Evaluation(name="evaluation_0") diff --git a/examples/pipeline/feldman_verifiable_sum/feldman_verifiable_sum_testsuite.json b/examples/pipeline/feldman_verifiable_sum/feldman_verifiable_sum_testsuite.json deleted file mode 100644 index 24335925ba..0000000000 --- a/examples/pipeline/feldman_verifiable_sum/feldman_verifiable_sum_testsuite.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "data": [ - { - "file": "examples/data/breast_homo_test.csv", - "head": 1, - "partition": 16, - "table_name": "breast_homo_test", - "namespace": "experiment", - "role": "guest_0" - }, - { - "file": "examples/data/breast_homo_test.csv", - "head": 1, - "partition": 16, - "table_name": "breast_homo_test", - "namespace": "experiment", - "role": "host_0" - }, - { - "file": "examples/data/breast_homo_test.csv", - "head": 1, - "partition": 16, - "table_name": "breast_homo_test", - "namespace": "experiment", - "role": "host_1" - } - ], - "pipeline_tasks": { - "feldman-secret-sharing-sum": { - "script": "./pipeline-feldman-verifiable-sum.py" - } - } -} diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-asymmetric.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-asymmetric.py index 5e686440ad..8a5edc595e 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-asymmetric.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-asymmetric.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -68,6 +71,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-binning.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-binning.py index b43a3ab8b4..88fe0a2341 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-binning.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-binning.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "bucket", @@ -70,6 +73,9 @@ def main(config="../../config.yaml", namespace=""): "adjustment_factor": 0.5, "local_only": False, "skip_static": True, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-missing-value.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-missing-value.py index a5a12c81b3..e7a4b2f530 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-missing-value.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-bucket-missing-value.py @@ -50,8 +50,13 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_1.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "bucket", @@ -65,6 +70,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": None } diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-category-binning.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-category-binning.py index fe9fe02b50..147de69dcf 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-category-binning.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-category-binning.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -60,6 +63,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-large-bin.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-large-bin.py index 061111e53b..1bdf66b4ec 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-large-bin.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-large-bin.py @@ -46,7 +46,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -60,6 +63,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-manual-split-points.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-manual-split-points.py index fdbcb1a04d..2ec033fe47 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-manual-split-points.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-manual-split-points.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -68,6 +71,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-missing-value.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-missing-value.py index e5e9f2dc2e..85b4c1e554 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-missing-value.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-missing-value.py @@ -49,8 +49,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_1.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -64,6 +70,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": None } diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-model-loader.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-model-loader.py index 268fdd20a4..60dfafe6df 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-model-loader.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-model-loader.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -68,6 +71,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-bucket.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-bucket.py index 169060d35b..78047e36d2 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-bucket.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-bucket.py @@ -46,7 +46,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "bucket", @@ -59,7 +62,10 @@ def main(config="../../config.yaml", namespace=""): "category_indexes": None, "category_names": None, "adjustment_factor": 0.5, - "local_only": False + "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, } hetero_feature_binning_0 = HeteroFeatureBinning(name="hetero_feature_binning_0", **param) hetero_feature_binning_0.get_party_instance(role="guest", diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-optimal.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-optimal.py index 6761340c96..85bceadbb1 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-optimal.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-optimal.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -69,6 +72,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-sparse-optimal.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-sparse-optimal.py index 117ee5ba3d..b7f21aaac6 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-sparse-optimal.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host-sparse-optimal.py @@ -49,7 +49,11 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + param = { "method": "optimal", "optimal_binning_param": { @@ -70,6 +74,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host.py index 2bcea12214..689d26dbea 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multi-host.py @@ -46,7 +46,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -60,6 +63,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass-multihost.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass-multihost.py index be877df123..a85ccf4a50 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass-multihost.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass-multihost.py @@ -64,8 +64,14 @@ def main(config="../../config.yaml", namespace=""): role='host', party_id=host).component_param( with_label=True, output_format="dense") - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -86,6 +92,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass.py index 692ea11da1..097b8ecbc4 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-multiclass.py @@ -64,8 +64,14 @@ def main(config="../../config.yaml", namespace=""): role='host', party_id=host).component_param( with_label=True, output_format="dense") - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -86,6 +92,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-chi-square.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-chi-square.py index 5463498eac..d41435738f 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-chi-square.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-chi-square.py @@ -48,7 +48,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", "optimal_binning_param": { @@ -69,6 +72,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-gini.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-gini.py index 5bbc4deff4..3dd87b4d3a 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-gini.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-gini.py @@ -46,7 +46,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -68,6 +71,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-iv.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-iv.py index 662f07cd5c..57b19688a8 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-iv.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-iv.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -67,6 +70,9 @@ def main(config="../../config.yaml", namespace=""): "bin_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-ks.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-ks.py index c580ca980e..4364f23d23 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-ks.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-optim-ks.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -69,6 +72,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-quantile-binning.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-quantile-binning.py index 44dfbfb1d6..03e6037c6f 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-quantile-binning.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-quantile-binning.py @@ -46,7 +46,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -60,6 +63,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-skip-statistic.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-skip-statistic.py index 61ce5c7dfa..99dd4130eb 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-skip-statistic.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-skip-statistic.py @@ -69,8 +69,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -85,6 +91,9 @@ def main(config="../../config.yaml", namespace=""): "adjustment_factor": 0.5, "local_only": False, "skip_static": True, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-bucket-binning.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-bucket-binning.py index b93d4531a2..203ae0827e 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-bucket-binning.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-bucket-binning.py @@ -48,7 +48,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "bucket", @@ -70,6 +73,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-chi-square.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-chi-square.py index 4ab59789b4..9bc0adbec4 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-chi-square.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-chi-square.py @@ -48,7 +48,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", "optimal_binning_param": { @@ -69,6 +72,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-gini.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-gini.py index e07034e51f..a34ddfadf3 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-gini.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-gini.py @@ -48,7 +48,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -70,6 +73,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-iv.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-iv.py index 5f003385db..454170749c 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-iv.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-iv.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -69,6 +72,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-ks.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-ks.py index f187ad4657..74d519b3b0 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-ks.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-ks.py @@ -47,7 +47,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "optimal", @@ -69,6 +72,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-quantile-binning.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-quantile-binning.py index 53f854699e..9a4cf5e3b3 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-quantile-binning.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-quantile-binning.py @@ -48,7 +48,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False, output_format="sparse") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -62,6 +65,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-woe-binning.py b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-woe-binning.py index f60d60253d..39c42f0991 100644 --- a/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-woe-binning.py +++ b/examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-woe-binning.py @@ -45,7 +45,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -59,6 +62,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_type": None } diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually-left.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually-left.py index 8477d9780f..fb2dfa90d4 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually-left.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually-left.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually.py index f8cf03d21a..a41de7b7a1 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-anonymous-manually.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-fast-sbt.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-fast-sbt.py index a67efcd44b..02ea56bd14 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-fast-sbt.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-fast-sbt.py @@ -63,7 +63,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -84,7 +87,8 @@ def main(config="../../config.yaml", namespace=""): "objective": "cross_entropy" }, "encrypt_param": { - "method": "paillier" + "method": "paillier", + "key_length": 1024 }, "predict_param": { "threshold": 0.5 diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-selection.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-selection.py index 33ade4612b..d56dd1fb9e 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-selection.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-selection.py @@ -63,7 +63,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -80,6 +83,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-top-k.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-top-k.py index 4ab846e544..d2189a9fcb 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-top-k.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-iv-top-k.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-local-only.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-local-only.py index 9bc893da94..1a73442442 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-local-only.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-local-only.py @@ -63,7 +63,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -80,6 +83,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": True, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-manually.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-manually.py index ba91471dab..e975e6295e 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-manually.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-manually.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-host.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-host.py index 857e58254b..44fb59b128 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-host.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-host.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-iso.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-iso.py index cddeb1d6ed..a8710bcfa4 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-iso.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multi-iso.py @@ -69,7 +69,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -86,6 +89,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, @@ -107,7 +113,10 @@ def main(config="../../config.yaml", namespace=""): reader_1.get_party_instance(role='guest', party_id=guest).component_param(table=guest_eval_data) reader_1.get_party_instance(role='host', party_id=hosts).component_param(table=host_eval_data) data_transform_1 = DataTransform(name="data_transform_1") - intersection_1 = Intersection(name="intersection_1") + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_1) pipeline.add_component( data_transform_1, data=Data( diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass-all-case.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass-all-case.py index 21652f9846..9d5b6e6f73 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass-all-case.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass-all-case.py @@ -65,8 +65,14 @@ def main(config="../../config.yaml", namespace=""): role='host', party_id=host).component_param( with_label=True, output_format="dense") - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -88,6 +94,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass.py index 1e3648dc0b..06fef4e1a4 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-multiclass.py @@ -65,8 +65,14 @@ def main(config="../../config.yaml", namespace=""): role='host', party_id=host).component_param( with_label=True, output_format="dense") - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "method": "quantile", @@ -88,6 +94,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson-predict.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson-predict.py index 70196e0d09..7ad2ecfb47 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson-predict.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson-predict.py @@ -49,9 +49,12 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) - hetero_pearson_0 = HeteroPearson(name='hetero_pearson_0', column_indexes=-1) + hetero_pearson_0 = HeteroPearson(name='hetero_pearson_0', column_indexes=-1, fixpoint_bit_length=1024) hetero_binning_0 = HeteroFeatureBinning(name='hetero_binning_0') selection_param = { "name": "hetero_feature_selection_0", diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson.py index 3269faf31c..05ca66c761 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-pearson.py @@ -49,9 +49,12 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) - hetero_pearson_0 = HeteroPearson(name='hetero_pearson_0', column_indexes=-1) + hetero_pearson_0 = HeteroPearson(name='hetero_pearson_0', column_indexes=-1, fixpoint_bit_length=1024) hetero_binning_0 = HeteroFeatureBinning(name='hetero_binning_0') selection_param = { "select_col_indexes": -1, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-percentage-value.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-percentage-value.py index fb312d446a..1ae35f8b11 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-percentage-value.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-percentage-value.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-anonymous-col-names.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-anonymous-col-names.py index 69e4f6e145..97acc6b269 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-anonymous-col-names.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-anonymous-col-names.py @@ -49,9 +49,12 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) - hetero_pearson_0 = HeteroPearson(name='hetero_pearson_0', column_indexes=-1) + hetero_pearson_0 = HeteroPearson(name='hetero_pearson_0', column_indexes=-1, fixpoint_bit_length=1024) selection_param = { "name": "hetero_feature_selection_0", diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-col-names.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-col-names.py index 67e979e92f..2c94169f80 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-col-names.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-col-names.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-cols.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-cols.py index a652d72b4e..816dbc13c1 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-cols.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-select-cols.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-selection.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-selection.py index 26a75fc77f..64ac6376fd 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-selection.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-selection.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-single-predict.py b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-single-predict.py index a42dd78988..59e6092084 100644 --- a/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-single-predict.py +++ b/examples/pipeline/hetero_feature_selection/pipeline-hetero-feature-selection-single-predict.py @@ -68,7 +68,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -77,7 +80,10 @@ def main(config="../../config.yaml", namespace=""): reader_1.get_party_instance(role="guest", party_id=guest).component_param(table=guest_eval_data) reader_1.get_party_instance(role="host", party_id=host).component_param(table=host_eval_data) data_transform_1 = DataTransform(name="data_transform_1") - intersection_1 = Intersection(name="intersection_1") + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_1) pipeline.add_component( @@ -101,6 +107,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-cv.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-cv.py index bc7c4d9704..43b7d6cf91 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-cv.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-cv.py @@ -54,11 +54,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="None", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, cv_param={"n_splits": 5, "shuffle": False, "random_seed": 42, diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host-cv.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host-cv.py index a87d9772de..fe02bd3b3a 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host-cv.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host-cv.py @@ -59,11 +59,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="None", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, cv_param={"n_splits": 5, "shuffle": False, "random_seed": 42, diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host.py index 107b403881..473518d197 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-multi-host.py @@ -55,10 +55,14 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, + encrypt_param={"key_length": 1024}, init_param={"init_method": "zeros"}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sample-weight.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sample-weight.py index 707fb94a24..7a90f2f0c2 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sample-weight.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sample-weight.py @@ -56,7 +56,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) sample_weight_0 = SampleWeight(name="sample_weight_0") sample_weight_0.get_party_instance(role='guest', party_id=guest).component_param(need_run=True, sample_weight_name="pm") @@ -65,6 +68,7 @@ def main(config="../../config.yaml", namespace=""): alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse-sqn.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse-sqn.py index 896fe28731..d3f6d9790e 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse-sqn.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse-sqn.py @@ -53,11 +53,15 @@ def main(config="../../config.yaml", namespace=""): label_type="float") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sqn", tol=0.001, alpha=0.01, max_iter=2, early_stop="weight_diff", batch_size=100, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, sqn_param={ "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse.py index 7e02078419..209dcc6caa 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sparse.py @@ -56,10 +56,14 @@ def main(config="../../config.yaml", namespace=""): label_type="float") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=2, early_stop="weight_diff", batch_size=100, learning_rate=0.15, decay=0.0, decay_sqrt=False, + encrypt_param={"key_length": 1024}, init_param={"init_method": "zeros"}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sqn.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sqn.py index f6c16fa3f0..e5d5a282ea 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sqn.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-sqn.py @@ -55,11 +55,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sqn", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23, sqn_param={ "update_interval_L": 3, diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-validate.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-validate.py index 85072b99e5..14dd9464e5 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-validate.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-validate.py @@ -72,13 +72,20 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_1.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, callback_param={"callbacks": ["EarlyStopping", "PerformanceEvaluate"], "validation_freqs": 1, "early_stopping_rounds": 5, diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-warm-start.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-warm-start.py index 06f2d4665f..c970e070c3 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-warm-start.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr-warm-start.py @@ -55,12 +55,17 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0", only_output_key=False) + intersection_0 = Intersection( + name="intersection_0", + only_output_key=False, + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=5, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, callback_param={"callbacks": ["ModelCheckpoint"]}, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) @@ -69,6 +74,7 @@ def main(config="../../config.yaml", namespace=""): penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, + encrypt_param={"key_length": 1024}, floating_point_precision=23 ) diff --git a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr.py b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr.py index 29a7a442ea..ef1c450a0e 100644 --- a/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr.py +++ b/examples/pipeline/hetero_linear_regression/pipeline-hetero-linr.py @@ -55,11 +55,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-batch-random-strategy.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-batch-random-strategy.py index 3b70ef459b..db02ab772e 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-batch-random-strategy.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-batch-random-strategy.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -79,6 +82,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-cv.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-cv.py index 287fab8cf1..b3ee7bf1aa 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-cv.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-cv.py @@ -60,7 +60,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -77,6 +80,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 3, "shuffle": False, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-early-stop.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-early-stop.py index 7668db71f8..b7c1ef38fd 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-early-stop.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-early-stop.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -103,6 +106,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-feature-engineering.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-feature-engineering.py index e9b397cddd..d929361f4a 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-feature-engineering.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-feature-engineering.py @@ -68,7 +68,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -87,6 +90,9 @@ def main(config="../../config.yaml", namespace=""): "adjustment_factor": 0.5, "local_only": False, "need_run": True, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_type": "bin_num" @@ -139,6 +145,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "random_uniform" }, + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 5, "shuffle": False, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-multi-host.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-multi-host.py index 3b5fd16c09..cc3648d7f1 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-multi-host.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-multi-host.py @@ -62,7 +62,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -79,6 +82,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-no-intercept.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-no-intercept.py index 16382a654f..b18a93580e 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-no-intercept.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-no-intercept.py @@ -60,7 +60,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -78,6 +81,9 @@ def main(config="../../config.yaml", namespace=""): "init_method": "zeros", "fit_intercept": False }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-normal.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-normal.py index 9b28ac4c0d..0753ee9843 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-normal.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-normal.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -78,6 +81,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py index 565e4f19ab..6d4d046207 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py @@ -63,7 +63,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -80,6 +83,9 @@ def main(config="../../config.yaml", namespace=""): "learning_rate": 0.15, "init_param": { "init_method": "zeros" + }, + "encrypt_param": { + "key_length": 1024 } } hetero_lr_0 = HeteroLR(name="hetero_lr_0", **lr_param) diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-cv.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-cv.py index c8919eac06..0cef7dbfb6 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-cv.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-cv.py @@ -62,7 +62,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -79,6 +82,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 3, "shuffle": False, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-validate.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-validate.py index 4e05524f00..5b7209fcba 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-validate.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-ovr-validate.py @@ -66,7 +66,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -102,6 +105,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 3, "shuffle": False, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sample-weights.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sample-weights.py index a9dd7be859..b0f6caef77 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sample-weights.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sample-weights.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): with_label=True, output_format="dense") # start component numbering at 0 data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) - intersect_0 = Intersection(name='intersect_0') + intersect_0 = Intersection( + name='intersect_0', + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) scale_0 = FeatureScale(name='scale_0', need_run=False) sample_weight_0 = SampleWeight(name="sample_weight_0", class_weight={"0": 1, "1": 2}) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "ones" }, + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 5, "shuffle": True, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse-cv.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse-cv.py index 09f7d0cc35..8876399f2d 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse-cv.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse-cv.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -78,6 +81,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "random_uniform" }, + "encrypt_param": { + "key_length": 1024 + }, "cv_param": { "n_splits": 3, "shuffle": False, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse.py index f64fe85c17..74617fbec8 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-sparse.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) @@ -78,6 +81,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-validate.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-validate.py index 3af388bf11..c685072e0b 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-validate.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-validate.py @@ -64,7 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(intersection_0, data=Data(data=data_transform_0.output.data)) diff --git a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-warm-start.py b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-warm-start.py index 92e2b9e17a..98118d5708 100644 --- a/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-warm-start.py +++ b/examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-warm-start.py @@ -71,7 +71,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-coae.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-coae.py index a9bf75ba60..4a388e60e6 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-coae.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-coae.py @@ -58,7 +58,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # define network structure in torch style # # define guest model @@ -95,7 +98,7 @@ def main(config="../../config.yaml", namespace=""): hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=30, floating_point_precision=None, interactive_layer_lr=0.1, batch_size=-1, early_stop="diff", - coae_param={'enable': True, 'epoch': 100}) + coae_param={'enable': True, 'epoch': 100}, encrypt_param={"key_length": 1024}) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) guest_nn_0.add_bottom_model(seq) guest_nn_0.add_top_model(seq2) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-drop-out.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-drop-out.py index dd7a258195..fa5b26ac94 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-drop-out.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-drop-out.py @@ -53,10 +53,15 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=10, - interactive_layer_lr=0.01, batch_size=-1, validation_freqs=1, task_type='classification') + interactive_layer_lr=0.01, batch_size=-1, + validation_freqs=1, task_type='classification', + encrypt_param={"key_length": 1024}) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-multi-host.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-multi-host.py index f25862d519..e9cc8053f8 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-multi-host.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-multi-host.py @@ -56,10 +56,15 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts[0]).component_param(with_label=False) data_transform_0.get_party_instance(role='host', party_id=hosts[1]).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=20, - interactive_layer_lr=0.01, batch_size=-1, validation_freqs=1, task_type='classification') + interactive_layer_lr=0.01, batch_size=-1, + validation_freqs=1, task_type='classification', + encrypt_param={"key_length": 1024}) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0_host_0 = hetero_nn_0.get_party_instance(role='host', party_id=hosts[0]) host_nn_0_host_1 = hetero_nn_0.get_party_instance(role='host', party_id=hosts[1]) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-selective-bp.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-selective-bp.py index ff48ba15fe..7301969a51 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-selective-bp.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary-selective-bp.py @@ -53,11 +53,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=5, interactive_layer_lr=0.01, batch_size=128, validation_freqs=1, task_type='classification', - selector_param={"method": "relative"}) + selector_param={"method": "relative"}, encrypt_param={"key_length": 1024}) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary.py index e73c1fd997..aa6aeb4a6f 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-binary.py @@ -53,10 +53,16 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=20, - interactive_layer_lr=0.01, batch_size=-1, validation_freqs=1, task_type='classification') + interactive_layer_lr=0.01, batch_size=-1, + validation_freqs=1, task_type='classification', + encrypt_param={"key_length": 1024} + ) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-multi.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-multi.py index 2cd38845a1..ba80887d06 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-multi.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-multi.py @@ -54,11 +54,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=15, interactive_layer_lr=0.05, batch_size=256, validation_freqs=1, task_type='classification', - selector_param={"method": "relative"}) + selector_param={"method": "relative"}, encrypt_param={"key_length": 1024}) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-check-point.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-check-point.py index 45c3f52970..acbf2b2e65 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-check-point.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-check-point.py @@ -53,7 +53,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=20, interactive_layer_lr=0.01, batch_size=-1, task_type='classification', @@ -61,6 +64,9 @@ def main(config="../../config.yaml", namespace=""): "validation_freqs": 1, "callbacks": ["ModelCheckpoint"], "save_freq": 1}, + encrypt_param={ + "key_length": 1024 + } ) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-early-stop.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-early-stop.py index 4d0c0e1194..ad599e2673 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-early-stop.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-early-stop.py @@ -63,8 +63,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_1.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=100, interactive_layer_lr=0.01, batch_size=-1, task_type='classification', @@ -74,7 +80,10 @@ def main(config="../../config.yaml", namespace=""): "early_stopping_rounds": 2, "use_first_metric_only": True, "metrics": ["AUC"] - } + }, + encrypt_param={ + "key_length": 1024 + }, ) guest_nn_0 = hetero_nn_0.get_party_instance(role='guest', party_id=guest) host_nn_0 = hetero_nn_0.get_party_instance(role='host', party_id=host) diff --git a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-warm_start.py b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-warm_start.py index d749f2819e..ff45c3a9c8 100644 --- a/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-warm_start.py +++ b/examples/pipeline/hetero_nn/pipeline-hetero-nn-train-with-warm_start.py @@ -53,7 +53,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='guest', party_id=guest).component_param(with_label=True) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_nn_0 = HeteroNN(name="hetero_nn_0", epochs=20, interactive_layer_lr=0.01, batch_size=-1, validation_freqs=1, task_type='classification') @@ -90,7 +93,9 @@ def main(config="../../config.yaml", namespace=""): hetero_nn_0.compile(optimizer=optimizer, loss=loss) hetero_nn_1 = HeteroNN(name="hetero_nn_1", epochs=10, - interactive_layer_lr=0.01, batch_size=128, validation_freqs=1, task_type='classification') + interactive_layer_lr=0.01, batch_size=128, + validation_freqs=1, task_type='classification', + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name='eval_0', eval_type='binary') diff --git a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson.py b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson.py index ec67efc1a5..08eae823ec 100644 --- a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson.py +++ b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson.py @@ -22,7 +22,7 @@ def main(config="../../config.yaml", namespace=""): - common_param = dict(column_indexes=-1) + common_param = dict(column_indexes=-1, fixpoint_bit_length=1024) pipeline = run_pearson_pipeline( config=config, namespace=namespace, @@ -71,7 +71,10 @@ def run_pearson_pipeline( role="host", party_id=config.parties.host[0] ).component_param(with_label=False) - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) if common_param is None: common_param = {} diff --git a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_host_only.py b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_host_only.py index 82a20dc7e4..5dfcf7327d 100644 --- a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_host_only.py +++ b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_host_only.py @@ -71,7 +71,10 @@ def run_pearson_pipeline( role="host", party_id=config.parties.host[0] ).component_param(with_label=False) - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) if common_param is None: common_param = {} diff --git a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_mix_rand.py b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_mix_rand.py index db1ab7f0f3..84fa676756 100644 --- a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_mix_rand.py +++ b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_mix_rand.py @@ -21,7 +21,7 @@ def main(config="../../config.yaml", namespace=""): - common_param = dict(column_indexes=-1, use_mix_rand=True) + common_param = dict(column_indexes=-1, use_mix_rand=True, fixpoint_bit_length=1024) pipeline = run_pearson_pipeline( config=config, namespace=namespace, @@ -70,7 +70,10 @@ def run_pearson_pipeline( role="host", party_id=config.parties.host[0] ).component_param(with_label=False) - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) if common_param is None: common_param = {} diff --git a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_sole.py b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_sole.py index 7c3ec8793c..e359df3d66 100644 --- a/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_sole.py +++ b/examples/pipeline/hetero_pearson/pipeline_hetero_pearson_sole.py @@ -71,7 +71,10 @@ def run_pearson_pipeline( role="host", party_id=config.parties.host[0] ).component_param(with_label=False) - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) if common_param is None: common_param = {} diff --git a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-cv.py b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-cv.py index ca605796ac..c533e3add8 100644 --- a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-cv.py +++ b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-cv.py @@ -60,12 +60,16 @@ def main(config="../../config.yaml", namespace=""): output_format="dense", outlier_replace=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_poisson_0 = HeteroPoisson(name="hetero_poisson_0", early_stop="weight_diff", max_iter=10, optimizer="rmsprop", tol=0.001, penalty="L2", alpha=100.0, batch_size=-1, learning_rate=0.01, exposure_colname="exposure", decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, cv_param={ "n_splits": 5, "shuffle": False, diff --git a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-sparse.py b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-sparse.py index 8351fc7503..19efe3d333 100644 --- a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-sparse.py +++ b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-sparse.py @@ -52,11 +52,15 @@ def main(config="../../config.yaml", namespace=""): label_type="float") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_poisson_0 = HeteroPoisson(name="hetero_poisson_0", early_stop="weight_diff", max_iter=2, alpha=100.0, batch_size=-1, learning_rate=0.01, exposure_colname="exposure", optimizer="rmsprop", penalty="L2", decay_sqrt=False, tol=0.001, + encrypt_param={"key_length": 1024}, init_param={"init_method": "zeros"}, ) diff --git a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-validate.py b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-validate.py index ab2acb2c7c..0a851dd346 100644 --- a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-validate.py +++ b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-validate.py @@ -63,8 +63,14 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_poisson_0 = HeteroPoisson(name="hetero_poisson_0", early_stop="weight_diff", max_iter=20, exposure_colname="exposure", optimizer="rmsprop", tol=0.001, @@ -79,6 +85,7 @@ def main(config="../../config.yaml", namespace=""): "use_first_metric_only": False, "save_freq": 1 }, + encrypt_param={"key_length": 1024}, init_param={"init_method": "zeros"}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-warm-start.py b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-warm-start.py index 1d44831e00..48f025b20a 100644 --- a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-warm-start.py +++ b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson-warm-start.py @@ -55,16 +55,21 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_poisson_0 = HeteroPoisson(name="hetero_poisson_0", early_stop="weight_diff", max_iter=3, alpha=100.0, batch_size=-1, learning_rate=0.01, optimizer="rmsprop", exposure_colname="exposure", decay_sqrt=False, tol=0.001, callback_param={"callbacks": ["ModelCheckpoint"]}, + encrypt_param={"key_length": 1024}, init_param={"init_method": "zeros"}, penalty="L2") hetero_poisson_1 = HeteroPoisson(name="hetero_poisson_1", early_stop="weight_diff", max_iter=10, alpha=100.0, batch_size=-1, learning_rate=0.01, optimizer="rmsprop", - exposure_colname="exposure", decay_sqrt=False, tol=0.001, penalty="L2") + exposure_colname="exposure", decay_sqrt=False, tol=0.001, penalty="L2", + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson.py b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson.py index ad13a10108..876b7536c7 100644 --- a/examples/pipeline/hetero_poisson/pipeline-hetero-poisson.py +++ b/examples/pipeline/hetero_poisson/pipeline-hetero-poisson.py @@ -55,11 +55,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_poisson_0 = HeteroPoisson(name="hetero_poisson_0", early_stop="weight_diff", max_iter=10, alpha=100.0, batch_size=-1, learning_rate=0.01, optimizer="rmsprop", exposure_colname="exposure", decay_sqrt=False, tol=0.001, - init_param={"init_method": "zeros"}, penalty="L2") + init_param={"init_method": "zeros"}, encrypt_param={"key_length": 1024}, + penalty="L2") evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-EINI-with-random-mask.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-EINI-with-random-mask.py index 1326f38fd5..3d54938beb 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-EINI-with-random-mask.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-EINI-with-random-mask.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, EINI_inference=True, diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cipher-compress.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cipher-compress.py index 27f00e82ed..7862334c8b 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cipher-compress.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cipher-compress.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "paillier"}, + encrypt_param={"method": "paillier", "key_length": 1024}, tree_param={"max_depth": 3}, cipher_compress_error=8, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-complete-secure.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-complete-secure.py index a5fee6633c..5bf3ec1ca1 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-complete-secure.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-complete-secure.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, complete_secure=True, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cv.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cv.py index ff42d99067..b9bd1dc596 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cv.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-cv.py @@ -53,14 +53,17 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, cv_param={ diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-no-cipher-compress.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-no-cipher-compress.py index 9f8d279ee2..7ca8f5450a 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-no-cipher-compress.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-no-cipher-compress.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, cipher_compress=False, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-missing-value.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-missing-value.py index 966161be3e..ccf6128d59 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-missing-value.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-missing-value.py @@ -74,15 +74,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, use_missing=True, # use missing validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-predict.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-predict.py index 1a83d4ac8a..e6675bf637 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-predict.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary-with-predict.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary.py index 64175bce3d..cdee279a22 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-binary.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-early-stop.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-early-stop.py index 712b8fbe28..17f2d0277d 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-early-stop.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-early-stop.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="regression", objective_param={"objective": "lse"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, early_stopping_rounds=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-binary.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-binary.py index d4e67bf31d..43f05e8938 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-binary.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-binary.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=10, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, boosting_strategy='layered', validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-multi.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-multi.py index c2f1d401f9..51380b7bdd 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-multi.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-layered-multi.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, boosting_strategy='layered' diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-binary.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-binary.py index 2fa7b0d776..987f6a97a7 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-binary.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-binary.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=10, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, boosting_strategy='mix', validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-multi.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-multi.py index eac93cc266..c6f5ba8878 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-multi.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-mix-multi.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, boosting_strategy='mix' diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-cv.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-cv.py index 792beab3c0..1d06450e4c 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-cv.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-cv.py @@ -53,14 +53,17 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, cv_param={ diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-mo.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-mo.py index d4e3b80a0b..ea5ace68ec 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-mo.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi-mo.py @@ -66,15 +66,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, multi_mode='multi_output' diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi.py index 2b07ee2b88..3ff3dfb9dc 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-multi.py @@ -66,7 +66,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) intersect_1 = Intersection(name="intersection_1") # secure boost component @@ -74,7 +77,7 @@ def main(config="../../config.yaml", namespace=""): num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-cv.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-cv.py index 7f2d6f9981..f070273f8f 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-cv.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-cv.py @@ -56,14 +56,17 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="regression", objective_param={"objective": "lse"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1, cv_param={ diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py index 277825f894..c46e2d1a9b 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py @@ -82,15 +82,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=hosts[1]).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="regression", objective_param={"objective": "lse"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression.py index e4988dc8c9..7f542947eb 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression.py @@ -72,15 +72,21 @@ def main(config="../../config.yaml", namespace=""): data_transform_1.get_party_instance(role="host", party_id=host).component_param(with_label=False) # data intersect component - intersect_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersect_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # secure boost component hetero_secure_boost_0 = HeteroSecureBoost(name="hetero_secure_boost_0", num_trees=3, task_type="regression", objective_param={"objective": "lse"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1) diff --git a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-warm-start.py b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-warm-start.py index 45737a805f..058b5819f8 100644 --- a/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-warm-start.py +++ b/examples/pipeline/hetero_sbt/pipeline-hetero-sbt-warm-start.py @@ -69,7 +69,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) @@ -82,7 +85,7 @@ def main(config="../../config.yaml", namespace=""): num_trees=3, task_type="classification", objective_param={"objective": "cross_entropy"}, - encrypt_param={"method": "Paillier"}, + encrypt_param={"method": "Paillier", "key_length": 1024}, tree_param={"max_depth": 3}, validation_freqs=1) diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-compute-loss-not-reveal.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-compute-loss-not-reveal.py index c2cad38086..7a96b8b5e5 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-compute-loss-not-reveal.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-compute-loss-not-reveal.py @@ -46,11 +46,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty=None, optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros", "fit_intercept": True}, + encrypt_param={"key_length": 1024}, reveal_every_iter=False, reveal_strategy="respectively" ) diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-cv.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-cv.py index 08d293d9a1..3676fa13da 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-cv.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-cv.py @@ -49,11 +49,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty="None", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, cv_param={"n_splits": 5, "shuffle": False, "random_seed": 42, diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-encrypted-reveal-in-host.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-encrypted-reveal-in-host.py index 900a61d5f3..8b91367087 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-encrypted-reveal-in-host.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-encrypted-reveal-in-host.py @@ -50,11 +50,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty="None", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, cv_param={"n_splits": 5, "shuffle": False, "random_seed": 42, diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-large-init-w-compute-loss.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-large-init-w-compute-loss.py index 60db5c6f7c..71e6a6d985 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-large-init-w-compute-loss.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-large-init-w-compute-loss.py @@ -51,10 +51,14 @@ def main(config="../../config.yaml", namespace=""): label_type="float") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=100, learning_rate=0.2, decay=0.0, decay_sqrt=False, + encrypt_param={"key_length": 1024}, init_param={"init_method": "const", "init_const": 100}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-sample-weight.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-sample-weight.py index 574b3e73e4..2d4486e945 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-sample-weight.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-sample-weight.py @@ -51,7 +51,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) sample_weight_0 = SampleWeight(name="sample_weight_0") sample_weight_0.get_party_instance(role='guest', party_id=guest).component_param(need_run=True, sample_weight_name="pm") @@ -60,6 +63,7 @@ def main(config="../../config.yaml", namespace=""): alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, reveal_every_iter=True, reveal_strategy="respectively" ) diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-validate.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-validate.py index 93aa47ce55..ab6b16b01a 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-validate.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-validate.py @@ -64,13 +64,20 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_1.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") - intersect_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersect_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, callback_param={"callbacks": ["EarlyStopping", "PerformanceEvaluate"], "validation_freqs": 1, "early_stopping_rounds": 5, diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-warm-start.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-warm-start.py index b3396df5d4..f29dee651c 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-warm-start.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr-warm-start.py @@ -50,11 +50,16 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0", only_output_key=False) + intersection_0 = Intersection( + name="intersection_0", + only_output_key=False, + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=5, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, callback_param={"callbacks": ["ModelCheckpoint"]}, + encrypt_param={"key_length": 1024}, init_param={"init_method": "zeros"}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr.py b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr.py index b445f25345..8a2f6d3d96 100644 --- a/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr.py +++ b/examples/pipeline/hetero_sshe_linr/pipeline-hetero-linr.py @@ -50,11 +50,15 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroSSHELinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, reveal_every_iter=True) evaluation_0 = Evaluation(name="evaluation_0", eval_type="regression", pos_label=1) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss-not-reveal.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss-not-reveal.py index 99a0af4938..f5167141f0 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss-not-reveal.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss-not-reveal.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss.py index 3c9bfdf7a8..04004dd41b 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-compute-loss.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-encrypted-not-reveal.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-encrypted-not-reveal.py index 71cf16edfa..731e0aa577 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-encrypted-not-reveal.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-encrypted-not-reveal.py @@ -68,7 +68,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-respectively-not-reveal.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-respectively-not-reveal.py index bfb2baa3dc..f89cb73825 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-respectively-not-reveal.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-converged-weight-diff-respectively-not-reveal.py @@ -68,7 +68,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-cv.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-cv.py index 5596768be9..7eeeee027b 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-cv.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-cv.py @@ -69,7 +69,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-encrypted-reveal-in-host.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-encrypted-reveal-in-host.py index 0fc0605bdd..334fbc05d2 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-encrypted-reveal-in-host.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-encrypted-reveal-in-host.py @@ -69,7 +69,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) selection_param = { "select_col_indexes": -1, @@ -101,6 +104,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "random_uniform" }, + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": "encrypted_reveal_in_host", "reveal_every_iter": False } diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-l1.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-l1.py index 1f3f2c1d63..6519d3bf04 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-l1.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-l1.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-large-init-w-compute-loss.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-large-init-w-compute-loss.py index 512b5bd43f..79c9545af9 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-large-init-w-compute-loss.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-large-init-w-compute-loss.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal-not-fit-intercept.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal-not-fit-intercept.py index 62bb567dfe..43382af714 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal-not-fit-intercept.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal-not-fit-intercept.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal.py index f1f1461f31..5faea18b9c 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-normal.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-encrypted-reveal-in-host.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-encrypted-reveal-in-host.py index af52be7480..b3eeb9f78b 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-encrypted-reveal-in-host.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-encrypted-reveal-in-host.py @@ -77,8 +77,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) selection_param = { "select_col_indexes": -1, @@ -115,6 +121,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "random_uniform" }, + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": "encrypted_reveal_in_host", "reveal_every_iter": False } diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-l1.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-l1.py index 5bcfd2ef28..985d451078 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-l1.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-l1.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-none-penalty.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-none-penalty.py index 1fc56cd524..4050d76c53 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-none-penalty.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr-none-penalty.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr.py index 5e60d40ec5..845dcf800c 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-ovr.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-sample-weights.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-sample-weights.py index 22abb8360e..bb13379f9f 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-sample-weights.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-sample-weights.py @@ -61,7 +61,10 @@ def main(config="../../config.yaml", namespace=""): with_label=True, output_format="dense") # start component numbering at 0 data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) - intersect_0 = Intersection(name='intersect_0') + intersect_0 = Intersection( + name='intersect_0', + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) scale_0 = FeatureScale(name='scale_0', need_run=False) sample_weight_0 = SampleWeight(name="sample_weight_0", class_weight={"0": 1, "1": 2}) @@ -81,6 +84,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "ones" }, + "encrypt_param": { + "key_length": 1024 + }, "reveal_every_iter": False, "reveal_strategy": "respectively" } diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-warm-start.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-warm-start.py index d2c04765ba..26d9524e45 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-warm-start.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-warm-start.py @@ -70,7 +70,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) diff --git a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-with-validate.py b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-with-validate.py index 155c327e58..4e8ec3ed72 100644 --- a/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-with-validate.py +++ b/examples/pipeline/hetero_sshe_lr/pipeline-hetero-lr-with-validate.py @@ -76,8 +76,14 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) pipeline.add_component(reader_0) pipeline.add_component(reader_1) @@ -109,6 +115,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "zeros" }, + "encrypt_param": { + "key_length": 1024 + }, "reveal_strategy": "respectively", "reveal_every_iter": True } diff --git a/examples/pipeline/hetero_stepwise/pipeline-stepwise-linr.py b/examples/pipeline/hetero_stepwise/pipeline-stepwise-linr.py index 9b404c8922..13ad25a4d8 100644 --- a/examples/pipeline/hetero_stepwise/pipeline-stepwise-linr.py +++ b/examples/pipeline/hetero_stepwise/pipeline-stepwise-linr.py @@ -55,12 +55,16 @@ def main(config="../../config.yaml", namespace=""): ) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", early_stop="diff", max_iter=3, penalty="None", optimizer="sgd", tol=0.001, alpha=0.01, batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, stepwise_param={"score_name": "AIC", "direction": "backward", "need_stepwise": True, "max_step": 3, "nvmin": 2 }) diff --git a/examples/pipeline/hetero_stepwise/pipeline-stepwise-lr.py b/examples/pipeline/hetero_stepwise/pipeline-stepwise-lr.py index 7f301bb1ae..b3a4c590d3 100644 --- a/examples/pipeline/hetero_stepwise/pipeline-stepwise-lr.py +++ b/examples/pipeline/hetero_stepwise/pipeline-stepwise-lr.py @@ -50,12 +50,16 @@ def main(config="../../config.yaml", namespace=""): with_label=True, output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_lr_0 = HeteroLR(name="hetero_lr_0", early_stop="diff", max_iter=5, penalty="None", optimizer="sgd", tol=0.001, batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, stepwise_param={"score_name": "AIC", "direction": "backward", "need_stepwise": True, "max_step": 2, "nvmin": 2 }) diff --git a/examples/pipeline/hetero_stepwise/pipeline-stepwise-poisson.py b/examples/pipeline/hetero_stepwise/pipeline-stepwise-poisson.py index b535af7964..c51d9413da 100644 --- a/examples/pipeline/hetero_stepwise/pipeline-stepwise-poisson.py +++ b/examples/pipeline/hetero_stepwise/pipeline-stepwise-poisson.py @@ -55,12 +55,16 @@ def main(config="../../config.yaml", namespace=""): ) data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_poisson_0 = HeteroPoisson(name="hetero_poisson_0", early_stop="diff", max_iter=5, penalty="None", optimizer="sgd", tol=0.001, batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, alpha=0.01, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, stepwise_param={"score_name": "AIC", "direction": "both", "need_stepwise": True, "max_step": 1, "nvmin": 2 }) diff --git a/examples/pipeline/intersect/pipeline-intersect-multi-rsa.py b/examples/pipeline/intersect/pipeline-intersect-multi-rsa.py index 2e5f8e51f2..822a4b4d2d 100644 --- a/examples/pipeline/intersect/pipeline-intersect-multi-rsa.py +++ b/examples/pipeline/intersect/pipeline-intersect-multi-rsa.py @@ -62,7 +62,7 @@ def main(config="../../config.yaml", namespace=""): "rsa_params": { "hash_method": "sha256", "final_hash_method": "sha256", - "split_calculation": False + "key_length": 1024 } } intersect_0 = Intersection(name="intersect_0", **param) diff --git a/examples/pipeline/intersect/pipeline-intersect-rsa-cache-loader.py b/examples/pipeline/intersect/pipeline-intersect-rsa-cache-loader.py index 319afbfed2..023722ff35 100644 --- a/examples/pipeline/intersect/pipeline-intersect-rsa-cache-loader.py +++ b/examples/pipeline/intersect/pipeline-intersect-rsa-cache-loader.py @@ -58,7 +58,7 @@ def main(config="../../config.yaml", namespace=""): "rsa_params": { "hash_method": "sha256", "final_hash_method": "sha256", - "key_length": 2048 + "key_length": 1024 } } intersect_0 = Intersection(name="intersect_0", **param) diff --git a/examples/pipeline/intersect/pipeline-intersect-rsa-cache.py b/examples/pipeline/intersect/pipeline-intersect-rsa-cache.py index 2dec04761d..6364b0eaa8 100644 --- a/examples/pipeline/intersect/pipeline-intersect-rsa-cache.py +++ b/examples/pipeline/intersect/pipeline-intersect-rsa-cache.py @@ -66,7 +66,7 @@ def main(config="../../config.yaml", namespace=""): "rsa_params": { "hash_method": "sha256", "final_hash_method": "sha256", - "key_length": 2048 + "key_length": 1024 } } intersect_0 = Intersection(name="intersect_0", **param_0) diff --git a/examples/pipeline/intersect/pipeline-intersect-rsa-fraction.py b/examples/pipeline/intersect/pipeline-intersect-rsa-fraction.py index 753e715382..cc776206e6 100644 --- a/examples/pipeline/intersect/pipeline-intersect-rsa-fraction.py +++ b/examples/pipeline/intersect/pipeline-intersect-rsa-fraction.py @@ -58,7 +58,8 @@ def main(config="../../config.yaml", namespace=""): "hash_method": "sha256", "final_hash_method": "sha256", "split_calculation": False, - "random_base_fraction": 0.5 + "random_base_fraction": 0.5, + "key_length": 1024 } } intersect_0 = Intersection(name="intersect_0", **param) diff --git a/examples/pipeline/intersect/pipeline-intersect-rsa-split.py b/examples/pipeline/intersect/pipeline-intersect-rsa-split.py index a843af32ac..93df14a7a6 100644 --- a/examples/pipeline/intersect/pipeline-intersect-rsa-split.py +++ b/examples/pipeline/intersect/pipeline-intersect-rsa-split.py @@ -58,7 +58,8 @@ def main(config="../../config.yaml", namespace=""): "hash_method": "sha256", "final_hash_method": "sha256", "split_calculation": True, - "random_base_fraction": 0.5 + "random_base_fraction": 0.5, + "key_length": 1024 } } intersect_0 = Intersection(name="intersect_0", **param) diff --git a/examples/pipeline/intersect/pipeline-intersect-rsa-w-preprocess.py b/examples/pipeline/intersect/pipeline-intersect-rsa-w-preprocess.py index d83778b04d..994faf6d35 100644 --- a/examples/pipeline/intersect/pipeline-intersect-rsa-w-preprocess.py +++ b/examples/pipeline/intersect/pipeline-intersect-rsa-w-preprocess.py @@ -57,7 +57,7 @@ def main(config="../../config.yaml", namespace=""): "rsa_params": { "hash_method": "sha256", "final_hash_method": "sha256", - "key_length": 2048 + "key_length": 1024 }, "run_preprocess": True, "intersect_preprocess_params": { diff --git a/examples/pipeline/intersect/pipeline-intersect-rsa.py b/examples/pipeline/intersect/pipeline-intersect-rsa.py index f423d6d80d..c00cdf1d0b 100644 --- a/examples/pipeline/intersect/pipeline-intersect-rsa.py +++ b/examples/pipeline/intersect/pipeline-intersect-rsa.py @@ -57,7 +57,7 @@ def main(config="../../config.yaml", namespace=""): "rsa_params": { "hash_method": "sha256", "final_hash_method": "sha256", - "key_length": 2048 + "key_length": 1024 } } intersect_0 = Intersection(name="intersect_0", **param) diff --git a/examples/pipeline/label_transform/pipeline-label-transform-encoder-partial.py b/examples/pipeline/label_transform/pipeline-label-transform-encoder-partial.py index aa87e7ca9c..c15383ca02 100644 --- a/examples/pipeline/label_transform/pipeline-label-transform-encoder-partial.py +++ b/examples/pipeline/label_transform/pipeline-label-transform-encoder-partial.py @@ -54,7 +54,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0_guest_party_instance.component_param(with_label=True, output_format="dense") data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False, output_format="dense") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) label_transform_0 = LabelTransform(name="label_transform_0", label_encoder={"0": 1, "1": 0}) label_transform_0.get_party_instance(role="host", party_id=host).component_param(need_run=False) @@ -63,6 +66,7 @@ def main(config="../../config.yaml", namespace=""): alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) label_transform_1 = LabelTransform(name="label_transform_1") diff --git a/examples/pipeline/label_transform/pipeline-label-transform-encoder-without-label-list.py b/examples/pipeline/label_transform/pipeline-label-transform-encoder-without-label-list.py index d88fefcc5d..128e41569f 100644 --- a/examples/pipeline/label_transform/pipeline-label-transform-encoder-without-label-list.py +++ b/examples/pipeline/label_transform/pipeline-label-transform-encoder-without-label-list.py @@ -55,7 +55,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0_guest_party_instance.component_param(with_label=True, output_format="dense") data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False, output_format="dense") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) label_transform_0 = LabelTransform(name="label_transform_0", label_encoder={"0": 1, "1": 0}) label_transform_0.get_party_instance(role="host", party_id=host).component_param(need_run=False) @@ -64,6 +67,7 @@ def main(config="../../config.yaml", namespace=""): alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) label_transform_1 = LabelTransform(name="label_transform_1") diff --git a/examples/pipeline/label_transform/pipeline-label-transform-encoder.py b/examples/pipeline/label_transform/pipeline-label-transform-encoder.py index 1ea5ed3fcb..0ac4f4dd00 100644 --- a/examples/pipeline/label_transform/pipeline-label-transform-encoder.py +++ b/examples/pipeline/label_transform/pipeline-label-transform-encoder.py @@ -55,7 +55,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0_guest_party_instance.component_param(with_label=True, output_format="dense") data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False, output_format="dense") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) label_transform_0 = LabelTransform(name="label_transform_0", label_encoder={"0": 1, "1": 0}, label_list=[0, 1]) label_transform_0.get_party_instance(role="host", party_id=host).component_param(need_run=False) @@ -64,6 +67,7 @@ def main(config="../../config.yaml", namespace=""): alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) label_transform_1 = LabelTransform(name="label_transform_1") diff --git a/examples/pipeline/label_transform/pipeline-label-transform.py b/examples/pipeline/label_transform/pipeline-label-transform.py index 028e0f3126..299ea876e2 100644 --- a/examples/pipeline/label_transform/pipeline-label-transform.py +++ b/examples/pipeline/label_transform/pipeline-label-transform.py @@ -56,7 +56,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0_guest_party_instance.component_param(with_label=True, output_format="dense") data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False, output_format="dense") - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) label_transform_0 = LabelTransform(name="label_transform_0") label_transform_0.get_party_instance(role="host", party_id=host).component_param(need_run=False) @@ -65,6 +68,7 @@ def main(config="../../config.yaml", namespace=""): alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, decay=0.0, decay_sqrt=False, init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}, floating_point_precision=23) label_transform_1 = LabelTransform(name="label_transform_1") diff --git a/examples/pipeline/local_baseline/pipeline-local-baseline-sample-weight.py b/examples/pipeline/local_baseline/pipeline-local-baseline-sample-weight.py index e7b657abc6..bc3a253c8a 100644 --- a/examples/pipeline/local_baseline/pipeline-local-baseline-sample-weight.py +++ b/examples/pipeline/local_baseline/pipeline-local-baseline-sample-weight.py @@ -58,8 +58,10 @@ def main(config="../../config.yaml", namespace=""): label_name="y") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0", intersect_method="rsa", sync_intersect_ids=True, - only_output_key=False) + intersection_0 = Intersection( + name="intersection_0", intersect_method="rsa", + sync_intersect_ids=True, only_output_key=False, + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) sample_weight_0 = SampleWeight(name="sample_weight_0") sample_weight_0.get_party_instance(role='guest', party_id=guest).component_param(need_run=True, @@ -68,7 +70,8 @@ def main(config="../../config.yaml", namespace=""): hetero_lr_0 = HeteroLR(name="hetero_lr_0", penalty="L2", optimizer="nesterov_momentum_sgd", tol=0.0001, alpha=0.0001, max_iter=30, batch_size=-1, - early_stop="diff", learning_rate=0.15, init_param={"init_method": "zeros"}) + early_stop="diff", learning_rate=0.15, + init_param={"init_method": "zeros"}, encrypt_param={"key_length": 1024}) local_baseline_0 = LocalBaseline(name="local_baseline_0", model_name="LogisticRegression", model_opts={"penalty": "l2", "tol": 0.0001, "C": 1.0, "fit_intercept": True, diff --git a/examples/pipeline/local_baseline/pipeline-local-baseline.py b/examples/pipeline/local_baseline/pipeline-local-baseline.py index 26745313a0..83c0ef35f9 100644 --- a/examples/pipeline/local_baseline/pipeline-local-baseline.py +++ b/examples/pipeline/local_baseline/pipeline-local-baseline.py @@ -57,11 +57,15 @@ def main(config="../../config.yaml", namespace=""): label_name="y") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0", intersect_method="rsa", sync_intersect_ids=True, - only_output_key=False) + intersection_0 = Intersection( + name="intersection_0", intersect_method="rsa", + sync_intersect_ids=True, only_output_key=False, + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) hetero_lr_0 = HeteroLR(name="hetero_lr_0", penalty="L2", optimizer="nesterov_momentum_sgd", tol=0.0001, alpha=0.0001, max_iter=30, batch_size=-1, - early_stop="diff", learning_rate=0.15, init_param={"init_method": "zeros"}) + early_stop="diff", learning_rate=0.15, + init_param={"init_method": "zeros"}, encrypt_param={"key_length": 1024}, + ) local_baseline_0 = LocalBaseline(name="local_baseline_0", model_name="LogisticRegression", model_opts={"penalty": "l2", "tol": 0.0001, "C": 1.0, "fit_intercept": True, diff --git a/examples/pipeline/multi_model/pipeline-hetero-multi-model.py b/examples/pipeline/multi_model/pipeline-hetero-multi-model.py index 36ce05b1b1..151b7f057b 100644 --- a/examples/pipeline/multi_model/pipeline-hetero-multi-model.py +++ b/examples/pipeline/multi_model/pipeline-hetero-multi-model.py @@ -79,9 +79,18 @@ def main(config="../../config.yaml", namespace=""): data_transform_1 = DataTransform(name="data_transform_1") data_transform_2 = DataTransform(name="data_transform_2") - intersection_0 = Intersection(name="intersection_0") - intersection_1 = Intersection(name="intersection_1") - intersection_2 = Intersection(name="intersection_2") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_1 = Intersection( + name="intersection_1", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) + intersection_2 = Intersection( + name="intersection_2", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) union_0 = Union(name="union_0") @@ -91,8 +100,22 @@ def main(config="../../config.yaml", namespace=""): feature_scale_0 = FeatureScale(name="feature_scale_0") feature_scale_1 = FeatureScale(name="feature_scale_1") - hetero_feature_binning_0 = HeteroFeatureBinning(name="hetero_feature_binning_0") - hetero_feature_binning_1 = HeteroFeatureBinning(name="hetero_feature_binning_1") + hetero_feature_binning_0 = HeteroFeatureBinning( + name="hetero_feature_binning_0", + bin_num=10, + bin_indexes=-1, + error=0.001, + encrypt_param={"key_length": 1024}, + transform_param={"transform_cols": -1, "transform_type": "bin_num"} + ) + hetero_feature_binning_1 = HeteroFeatureBinning( + name="hetero_feature_binning_1", + bin_num=10, + bin_indexes=-1, + error=0.001, + encrypt_param={"key_length": 1024}, + transform_param={"transform_cols": -1, "transform_type": "bin_num"} + ) hetero_feature_selection_0 = HeteroFeatureSelection(name="hetero_feature_selection_0") hetero_feature_selection_1 = HeteroFeatureSelection(name="hetero_feature_selection_1") @@ -101,11 +124,11 @@ def main(config="../../config.yaml", namespace=""): one_hot_1 = OneHotEncoder(name="one_hot_1") hetero_lr_0 = HeteroLR(name="hetero_lr_0", penalty="L2", optimizer="rmsprop", tol=1e-5, - init_param={"init_method": "random_uniform"}, + init_param={"init_method": "random_uniform"}, encrypt_param={"key_length": 1024}, alpha=0.01, max_iter=3, early_stop="diff", batch_size=320, learning_rate=0.15) hetero_lr_1 = HeteroLR(name="hetero_lr_1") hetero_lr_2 = HeteroLR(name="hetero_lr_2", penalty="L2", optimizer="rmsprop", tol=1e-5, - init_param={"init_method": "random_uniform"}, + init_param={"init_method": "random_uniform"}, encrypt_param={"key_length": 1024}, alpha=0.01, max_iter=3, early_stop="diff", batch_size=320, learning_rate=0.15, cv_param={"n_splits": 5, "shuffle": True, @@ -124,10 +147,12 @@ def main(config="../../config.yaml", namespace=""): local_baseline_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) local_baseline_1 = LocalBaseline(name="local_baseline_1") - hetero_secureboost_0 = HeteroSecureBoost(name="hetero_secureboost_0", num_trees=3) + hetero_secureboost_0 = HeteroSecureBoost(name="hetero_secureboost_0", num_trees=3, + encrypt_param={"method": "Paillier", "key_length": 1024}) hetero_secureboost_1 = HeteroSecureBoost(name="hetero_secureboost_1") hetero_secureboost_2 = HeteroSecureBoost(name="hetero_secureboost_2", num_trees=3, - cv_param={"shuffle": False, "need_cv": True}) + cv_param={"shuffle": False, "need_cv": True}, + encrypt_param={"method": "Paillier", "key_length": 1024}) hetero_linr_0 = HeteroLinR(name="hetero_linr_0", penalty="L2", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=3, early_stop="weight_diff", batch_size=-1, diff --git a/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-lr.py b/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-lr.py index 4203b8e923..cb56136026 100755 --- a/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-lr.py +++ b/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-lr.py @@ -67,12 +67,18 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # define LR and PositiveUnlabeled components lr_0_param = { "name": "hetero_lr_0", - "max_iter": 2 + "max_iter": 2, + "encrypt_param": { + "key_length": 1024 + } } pu_0_param = { "name": "positive_unlabeled_0", @@ -81,7 +87,10 @@ def main(config="../../config.yaml", namespace=""): } lr_1_param = { "name": "hetero_lr_1", - "max_iter": 1 + "max_iter": 1, + "encrypt_param": { + "key_length": 1024 + } } hetero_lr_0 = HeteroLR(**lr_0_param) positive_unlabeled_0 = PositiveUnlabeled(**pu_0_param) diff --git a/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sbt.py b/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sbt.py index 16d08fd2e2..9aedcd7802 100755 --- a/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sbt.py +++ b/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sbt.py @@ -66,7 +66,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # define SecureBoost and PositiveUnlabeled components sbt_0_param = { @@ -78,6 +81,9 @@ def main(config="../../config.yaml", namespace=""): "num_trees": 2, "tree_param": { "max_depth": 3 + }, + "encrypt_param": { + "key_length": 1024 } } pu_0_param = { @@ -94,6 +100,9 @@ def main(config="../../config.yaml", namespace=""): "num_trees": 1, "tree_param": { "max_depth": 2 + }, + "encrypt_param": { + "key_length": 1024 } } hetero_sbt_0 = HeteroSecureBoost(**sbt_0_param) diff --git a/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sshe-lr.py b/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sshe-lr.py index f6608974cb..551190eabd 100755 --- a/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sshe-lr.py +++ b/examples/pipeline/positive_unlabeled/pipeline-positive-unlabeled-sshe-lr.py @@ -66,12 +66,18 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) # define SSHE-LR and PositiveUnlabeled components sshe_lr_0_param = { "name": "hetero_sshe_lr_0", - "max_iter": 2 + "max_iter": 2, + "encrypt_param": { + "key_length": 1024 + } } pu_0_param = { "name": "positive_unlabeled_0", @@ -80,7 +86,10 @@ def main(config="../../config.yaml", namespace=""): } sshe_lr_1_param = { "name": "hetero_sshe_lr_1", - "max_iter": 1 + "max_iter": 1, + "encrypt_param": { + "key_length": 1024 + } } hetero_sshe_lr_0 = HeteroSSHELR(**sshe_lr_0_param) positive_unlabeled_0 = PositiveUnlabeled(**pu_0_param) diff --git a/examples/pipeline/sample_weight/pipeline-sample-weight-balanced.py b/examples/pipeline/sample_weight/pipeline-sample-weight-balanced.py index 27611bfcb9..62d4ddcbf6 100644 --- a/examples/pipeline/sample_weight/pipeline-sample-weight-balanced.py +++ b/examples/pipeline/sample_weight/pipeline-sample-weight-balanced.py @@ -56,7 +56,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) sample_weight_0 = SampleWeight(name="sample_weight_0") sample_weight_0.get_party_instance(role='guest', party_id=guest).component_param(need_run=True, @@ -66,7 +69,8 @@ def main(config="../../config.yaml", namespace=""): hetero_lr_0 = HeteroLR(name="hetero_lr_0", optimizer="nesterov_momentum_sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, - init_param={"init_method": "zeros"}) + init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary", pos_label=1) # evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/sample_weight/pipeline-sample-weight-class-dict-feature-engineering.py b/examples/pipeline/sample_weight/pipeline-sample-weight-class-dict-feature-engineering.py index b085dbd2d7..b4f4e30b95 100644 --- a/examples/pipeline/sample_weight/pipeline-sample-weight-class-dict-feature-engineering.py +++ b/examples/pipeline/sample_weight/pipeline-sample-weight-class-dict-feature-engineering.py @@ -59,7 +59,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) binning_param = { "name": 'hetero_feature_binning_0', @@ -74,6 +77,9 @@ def main(config="../../config.yaml", namespace=""): "category_names": None, "adjustment_factor": 0.5, "local_only": False, + "encrypt_param": { + "key_length": 1024 + }, "transform_param": { "transform_cols": -1, "transform_names": None, @@ -106,7 +112,8 @@ def main(config="../../config.yaml", namespace=""): hetero_lr_0 = HeteroLR(name="hetero_lr_0", optimizer="nesterov_momentum_sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, - init_param={"init_method": "zeros"}) + init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary", pos_label=1) # evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/sample_weight/pipeline-sample-weight-multi-host.py b/examples/pipeline/sample_weight/pipeline-sample-weight-multi-host.py index 4f91d0b329..957a4c1d85 100644 --- a/examples/pipeline/sample_weight/pipeline-sample-weight-multi-host.py +++ b/examples/pipeline/sample_weight/pipeline-sample-weight-multi-host.py @@ -58,7 +58,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=hosts).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) sample_weight_0 = SampleWeight(name="sample_weight_0") sample_weight_0.get_party_instance(role='guest', party_id=guest).component_param(need_run=True, @@ -68,7 +71,8 @@ def main(config="../../config.yaml", namespace=""): hetero_lr_0 = HeteroLR(name="hetero_lr_0", optimizer="nesterov_momentum_sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, - init_param={"init_method": "zeros"}) + init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary", pos_label=1) # evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/sample_weight/pipeline-sample-weight-name.py b/examples/pipeline/sample_weight/pipeline-sample-weight-name.py index 7cd65676fd..092365d3da 100644 --- a/examples/pipeline/sample_weight/pipeline-sample-weight-name.py +++ b/examples/pipeline/sample_weight/pipeline-sample-weight-name.py @@ -57,7 +57,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) scale_0 = FeatureScale(name="scale_0", method="min_max_scale", mode="normal", scale_names=["x0"]) sample_weight_0 = SampleWeight(name="sample_weight_0") @@ -70,7 +73,8 @@ def main(config="../../config.yaml", namespace=""): hetero_lr_0 = HeteroLR(name="hetero_lr_0", optimizer="sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.1, - init_param={"init_method": "random_uniform"}) + init_param={"init_method": "random_uniform"}, + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary", pos_label=1) # evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/sample_weight/pipeline-sample-weight-transform.py b/examples/pipeline/sample_weight/pipeline-sample-weight-transform.py index 7f02d57870..66ea043ec0 100644 --- a/examples/pipeline/sample_weight/pipeline-sample-weight-transform.py +++ b/examples/pipeline/sample_weight/pipeline-sample-weight-transform.py @@ -56,7 +56,10 @@ def main(config="../../config.yaml", namespace=""): output_format="dense") data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False) - intersection_0 = Intersection(name="intersection_0") + intersection_0 = Intersection( + name="intersection_0", + intersect_method="rsa", + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) sample_weight_0 = SampleWeight(name="sample_weight_0") sample_weight_0.get_party_instance(role='guest', party_id=guest).component_param(need_run=True, @@ -68,7 +71,8 @@ def main(config="../../config.yaml", namespace=""): hetero_lr_0 = HeteroLR(name="hetero_lr_0", optimizer="nesterov_momentum_sgd", tol=0.001, alpha=0.01, max_iter=20, early_stop="weight_diff", batch_size=-1, learning_rate=0.15, - init_param={"init_method": "zeros"}) + init_param={"init_method": "zeros"}, + encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary", pos_label=1) # evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/examples/pipeline/scorecard/pipeline-scorecard.py b/examples/pipeline/scorecard/pipeline-scorecard.py index 28fe7faac8..c8e58ca0de 100644 --- a/examples/pipeline/scorecard/pipeline-scorecard.py +++ b/examples/pipeline/scorecard/pipeline-scorecard.py @@ -64,8 +64,10 @@ def main(config="../../config.yaml", namespace=""): data_transform_0.get_party_instance(role="host", party_id=host).component_param(with_label=False) # define Intersection components - intersection_0 = Intersection(name="intersection_0", intersect_method="rsa", - sync_intersect_ids=True, only_output_key=False) + intersection_0 = Intersection( + name="intersection_0", intersect_method="rsa", + sync_intersect_ids=True, only_output_key=False, + rsa_params={"hash_method": "sha256", "final_hash_method": "sha256", "key_length": 1024}) param = { "penalty": "L2", @@ -79,6 +81,9 @@ def main(config="../../config.yaml", namespace=""): "init_param": { "init_method": "random_uniform" }, + "encrypt_param": { + "key_length": 1024 + }, "sqn_param": { "update_interval_L": 3, "memory_M": 5, diff --git a/examples/pipeline/secure_information_retrieval/secure_information_retrieval_testsuite.json b/examples/pipeline/secure_information_retrieval/secure_information_retrieval_testsuite.json deleted file mode 100644 index e7ae0f7983..0000000000 --- a/examples/pipeline/secure_information_retrieval/secure_information_retrieval_testsuite.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "data": [ - { - "file": "examples/data/breast_hetero_guest.csv", - "head": 1, - "partition": 16, - "table_name": "breast_hetero_guest", - "namespace": "experiment", - "role": "host_0" - }, - { - "file": "examples/data/breast_hetero_host.csv", - "head": 1, - "partition": 16, - "table_name": "breast_hetero_host", - "namespace": "experiment", - "role": "guest_0" - } - ], - "pipeline_tasks": { - "secure-information-retrieval": { - "script": "./secure-information-retrieval.py" - } - } -} diff --git a/examples/pipeline/union/pipeline-union.py b/examples/pipeline/union/pipeline-union.py index f6328c6783..758cee9cb7 100644 --- a/examples/pipeline/union/pipeline-union.py +++ b/examples/pipeline/union/pipeline-union.py @@ -69,8 +69,8 @@ def main(config="../../config.yaml", namespace=""): union_0 = Union(name="union_0") hetero_lr_0 = HeteroLR(name="hetero_lr_0", max_iter=3, early_stop="weight_diff", - optimizer="nesterov_momentum_sgd", tol=1E-4, alpha=0.01, - learning_rate=0.15, init_param={"init_method": "random_uniform"}) + optimizer="nesterov_momentum_sgd", tol=1E-4, alpha=0.01, learning_rate=0.15, + init_param={"init_method": "random_uniform"}, encrypt_param={"key_length": 1024}) evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary", pos_label=1) evaluation_0.get_party_instance(role='host', party_id=host).component_param(need_run=False) diff --git a/fate.env b/fate.env index 0c312f1a3b..7ee9eb1901 100644 --- a/fate.env +++ b/fate.env @@ -1,7 +1,7 @@ -FATE=1.11.3 +FATE=1.11.4 FATEFlow=1.11.2 FATEBoard=1.11.2 -EGGROLL=2.5.2 +EGGROLL=2.5.3 CENTOS=7.2 UBUNTU=16.04 PYTHON=3.8 diff --git a/python/fate_client/pyproject.toml b/python/fate_client/pyproject.toml index a7c6a25d02..d04675be64 100644 --- a/python/fate_client/pyproject.toml +++ b/python/fate_client/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fate_client" -version = "1.11.3.post1" +version = "1.11.4" description = "Clients for FATE, including flow_client and pipeline" authors = ["FederatedAI "] license = "Apache-2.0" diff --git a/python/fate_client/setup.py b/python/fate_client/setup.py index cad058a77d..41180eaa2e 100644 --- a/python/fate_client/setup.py +++ b/python/fate_client/setup.py @@ -47,7 +47,7 @@ setup_kwargs = { "name": "fate-client", - "version": "1.11.3.post1", + "version": "1.11.4", "description": "Clients for FATE, including flow_client and pipeline", "long_description": "FATE Client\n===========\n\nTools for interacting with FATE.\n\nquick start\n-----------\n\n1. (optional) create virtual env\n\n .. code-block:: bash\n\n python -m venv venv\n source venv/bin/activate\n\n\n2. install FATE Client\n\n .. code-block:: bash\n\n pip install fate-client\n\n\nPipeline\n========\n\nA high-level python API that allows user to design, start,\nand query FATE jobs in a sequential manner. For more information,\nplease refer to this `guide <./pipeline/README.rst>`__\n\nInitial Configuration\n---------------------\n\n1. Configure server information\n\n .. code-block:: bash\n\n # configure values in pipeline/config.yaml\n # use real ip address to configure pipeline\n pipeline init --ip 127.0.0.1 --port 9380 --log-directory ./logs\n\n\nFATE Flow Command Line Interface (CLI) v2\n=========================================\n\nA command line interface providing series of commands for user to design, start,\nand query FATE jobs. For more information, please refer to this `guide <./flow_client/README.rst>`__\n\nInitial Configuration\n---------------------\n\n1. Configure server information\n\n .. code-block:: bash\n\n # configure values in conf/service_conf.yaml\n flow init -c /data/projects/fate/conf/service_conf.yaml\n # use real ip address to initialize cli\n flow init --ip 127.0.0.1 --port 9380\n\n", "author": "FederatedAI", diff --git a/python/fate_test/pyproject.toml b/python/fate_test/pyproject.toml index f858cfb1c7..b8e0189222 100644 --- a/python/fate_test/pyproject.toml +++ b/python/fate_test/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fate_test" -version = "1.11.3" +version = "1.11.4" description = "test tools for FATE" authors = ["FederatedAI "] license = "Apache-2.0" diff --git a/python/fate_test/setup.py b/python/fate_test/setup.py index 6d23171c07..1a4a27504d 100644 --- a/python/fate_test/setup.py +++ b/python/fate_test/setup.py @@ -23,7 +23,7 @@ setup_kwargs = { "name": "fate-test", - "version": "1.11.3", + "version": "1.11.4", "description": "test tools for FATE", "long_description": 'FATE Test\n=========\n\nA collection of useful tools to running FATE\'s test.\n\n.. image:: images/tutorial.gif\n :align: center\n :alt: tutorial\n\nquick start\n-----------\n\n1. (optional) create virtual env\n\n .. code-block:: bash\n\n python -m venv venv\n source venv/bin/activate\n pip install -U pip\n\n\n2. install fate_test\n\n .. code-block:: bash\n\n pip install fate_test\n fate_test --help\n\n\n3. edit default fate_test_config.yaml\n\n .. code-block:: bash\n\n # edit priority config file with system default editor\n # filling some field according to comments\n fate_test config edit\n\n4. configure FATE-Pipeline and FATE-Flow Commandline server setting\n\n.. code-block:: bash\n\n # configure FATE-Pipeline server setting\n pipeline init --port 9380 --ip 127.0.0.1\n # configure FATE-Flow Commandline server setting\n flow init --port 9380 --ip 127.0.0.1\n\n5. run some fate_test suite\n\n .. code-block:: bash\n\n fate_test suite -i \n\n\n6. run some fate_test benchmark\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i \n\n7. useful logs or exception will be saved to logs dir with namespace shown in last step\n\ndevelop install\n---------------\nIt is more convenient to use the editable mode during development: replace step 2 with flowing steps\n\n.. code-block:: bash\n\n pip install -e ${FATE}/python/fate_client && pip install -e ${FATE}/python/fate_test\n\n\n\ncommand types\n-------------\n\n- suite: used for running testsuites, collection of FATE jobs\n\n .. code-block:: bash\n\n fate_test suite -i \n\n\n- benchmark-quality used for comparing modeling quality between FATE and other machine learning systems\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i \n\n\n\nconfiguration by examples\n--------------------------\n\n1. no need ssh tunnel:\n\n - 9999, service: service_a\n - 10000, service: service_b\n\n and both service_a, service_b can be requested directly:\n\n .. code-block:: yaml\n\n work_mode: 1 # 0 for standalone, 1 for cluster\n data_base_dir: \n parties:\n guest: [10000]\n host: [9999, 10000]\n arbiter: [9999]\n services:\n - flow_services:\n - {address: service_a, parties: [9999]}\n - {address: service_b, parties: [10000]}\n\n2. need ssh tunnel:\n\n - 9999, service: service_a\n - 10000, service: service_b\n\n service_a, can be requested directly while service_b don\'t,\n but you can request service_b in other node, say B:\n\n .. code-block:: yaml\n\n work_mode: 0 # 0 for standalone, 1 for cluster\n data_base_dir: \n parties:\n guest: [10000]\n host: [9999, 10000]\n arbiter: [9999]\n services:\n - flow_services:\n - {address: service_a, parties: [9999]}\n - flow_services:\n - {address: service_b, parties: [10000]}\n ssh_tunnel: # optional\n enable: true\n ssh_address: :\n ssh_username: \n ssh_password: # optional\n ssh_priv_key: "~/.ssh/id_rsa"\n\n\nTestsuite\n---------\n\nTestsuite is used for running a collection of jobs in sequence. Data used for jobs could be uploaded before jobs are\nsubmitted, and are cleaned when jobs finished. This tool is useful for FATE\'s release test.\n\ncommand options\n~~~~~~~~~~~~~~~\n\n.. code-block:: bash\n\n fate_test suite --help\n\n1. include:\n\n .. code-block:: bash\n\n fate_test suite -i \n\n will run testsuites in *path1*\n\n2. exclude:\n\n .. code-block:: bash\n\n fate_test suite -i -e -e ...\n\n will run testsuites in *path1* but not in *path2* and *path3*\n\n3. glob:\n\n .. code-block:: bash\n\n fate_test suite -i -g "hetero*"\n\n will run testsuites in sub directory start with *hetero* of *path1*\n\n4. replace:\n\n .. code-block:: bash\n\n fate_test suite -i -r \'{"maxIter": 5}\'\n\n will find all key-value pair with key "maxIter" in `data conf` or `conf` or `dsl` and replace the value with 5\n\n\n5. skip-data:\n\n .. code-block:: bash\n\n fate_test suite -i --skip-data\n\n will run testsuites in *path1* without uploading data specified in *benchmark.json*.\n\n\n6. yes:\n\n .. code-block:: bash\n\n fate_test suite -i --yes\n\n will run testsuites in *path1* directly, skipping double check\n\n7. skip-dsl-jobs:\n\n .. code-block:: bash\n\n fate_test suite -i --skip-dsl-jobs\n\n will run testsuites in *path1* but skip all *tasks* in testsuites. It\'s would be useful when only pipeline tasks needed.\n\n8. skip-pipeline-jobs:\n\n .. code-block:: bash\n\n fate_test suite -i --skip-pipeline-jobs\n\n will run testsuites in *path1* but skip all *pipeline tasks* in testsuites. It\'s would be useful when only dsl tasks needed.\n\n\nBenchmark Quality\n------------------\n\nBenchmark-quality is used for comparing modeling quality between FATE\nand other machine learning systems. Benchmark produces a metrics comparison\nsummary for each benchmark job group.\n\n.. code-block:: bash\n\n fate_test benchmark-quality -i examples/benchmark_quality/hetero_linear_regression\n\n.. code-block:: bash\n\n +-------+--------------------------------------------------------------+\n | Data | Name |\n +-------+--------------------------------------------------------------+\n | train | {\'guest\': \'motor_hetero_guest\', \'host\': \'motor_hetero_host\'} |\n | test | {\'guest\': \'motor_hetero_guest\', \'host\': \'motor_hetero_host\'} |\n +-------+--------------------------------------------------------------+\n +------------------------------------+--------------------+--------------------+-------------------------+---------------------+\n | Model Name | explained_variance | r2_score | root_mean_squared_error | mean_squared_error |\n +------------------------------------+--------------------+--------------------+-------------------------+---------------------+\n | local-linear_regression-regression | 0.9035168452250094 | 0.9035070863155368 | 0.31340413289880553 | 0.09822215051805216 |\n | FATE-linear_regression-regression | 0.903146386539082 | 0.9031411831961411 | 0.3139977881119483 | 0.09859461093919596 |\n +------------------------------------+--------------------+--------------------+-------------------------+---------------------+\n +-------------------------+-----------+\n | Metric | All Match |\n +-------------------------+-----------+\n | explained_variance | True |\n | r2_score | True |\n | root_mean_squared_error | True |\n | mean_squared_error | True |\n +-------------------------+-----------+\n\ncommand options\n~~~~~~~~~~~~~~~\n\nuse the following command to show help message\n\n.. code-block:: bash\n\n fate_test benchmark-quality --help\n\n1. include:\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i \n\n will run benchmark testsuites in *path1*\n\n2. exclude:\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i -e -e ...\n\n will run benchmark testsuites in *path1* but not in *path2* and *path3*\n\n3. glob:\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i -g "hetero*"\n\n will run benchmark testsuites in sub directory start with *hetero* of *path1*\n\n4. tol:\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i -t 1e-3\n\n will run benchmark testsuites in *path1* with absolute tolerance of difference between metrics set to 0.001.\n If absolute difference between metrics is smaller than *tol*, then metrics are considered\n almost equal. Check benchmark testsuite `writing guide <#benchmark-testsuite>`_ on setting alternative tolerance.\n\n5. skip-data:\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i --skip-data\n\n will run benchmark testsuites in *path1* without uploading data specified in *benchmark.json*.\n\n\n6. yes:\n\n .. code-block:: bash\n\n fate_test benchmark-quality -i --yes\n\n will run benchmark testsuites in *path1* directly, skipping double check\n\n\nbenchmark testsuite\n~~~~~~~~~~~~~~~~~~~\n\nConfiguration of jobs should be specified in a benchmark testsuite whose file name ends\nwith "\\*benchmark.json". For benchmark testsuite example,\nplease refer `here <../../examples/benchmark_quality>`_.\n\nA benchmark testsuite includes the following elements:\n\n- data: list of local data to be uploaded before running FATE jobs\n\n - file: path to original data file to be uploaded, should be relative to testsuite or FATE installation path\n - head: whether file includes header\n - partition: number of partition for data storage\n - table_name: table name in storage\n - namespace: table namespace in storage\n - role: which role to upload the data, as specified in fate_test.config;\n naming format is: "{role_type}_{role_index}", index starts at 0\n\n .. code-block:: json\n\n "data": [\n {\n "file": "examples/data/motor_hetero_host.csv",\n "head": 1,\n "partition": 8,\n "table_name": "motor_hetero_host",\n "namespace": "experiment",\n "role": "host_0"\n }\n ]\n\n- job group: each group includes arbitrary number of jobs with paths to corresponding script and configuration\n\n - job: name of job to be run, must be unique within each group list\n\n - script: path to `testing script <#testing-script>`_, should be relative to testsuite\n - conf: path to job configuration file for script, should be relative to testsuite\n\n .. code-block:: json\n\n "local": {\n "script": "./local-linr.py",\n "conf": "./linr_config.yaml"\n }\n\n - compare_setting: additional setting for quality metrics comparison, currently only takes ``relative_tol``\n\n If metrics *a* and *b* satisfy *abs(a-b) <= max(relative_tol \\* max(abs(a), abs(b)), absolute_tol)*\n (from `math module `_),\n they are considered almost equal. In the below example, metrics from "local" and "FATE" jobs are\n considered almost equal if their relative difference is smaller than\n *0.05 \\* max(abs(local_metric), abs(pipeline_metric)*.\n\n .. code-block:: json\n\n "linear_regression-regression": {\n "local": {\n "script": "./local-linr.py",\n "conf": "./linr_config.yaml"\n },\n "FATE": {\n "script": "./fate-linr.py",\n "conf": "./linr_config.yaml"\n },\n "compare_setting": {\n "relative_tol": 0.01\n }\n }\n\n\ntesting script\n~~~~~~~~~~~~~~\n\nAll job scripts need to have ``Main`` function as an entry point for executing jobs; scripts should\nreturn two dictionaries: first with data information key-value pairs: {data_type}: {data_name_dictionary};\nthe second contains {metric_name}: {metric_value} key-value pairs for metric comparison.\n\nBy default, the final data summary shows the output from the job named "FATE"; if no such job exists,\ndata information returned by the first job is shown. For clear presentation, we suggest that user follow\nthis general `guideline <../../examples/data/README.md#data-set-naming-rule>`_ for data set naming. In the case of multi-host\ntask, consider numbering host as such:\n\n::\n\n {\'guest\': \'default_credit_homo_guest\',\n \'host_1\': \'default_credit_homo_host_1\',\n \'host_2\': \'default_credit_homo_host_2\'}\n\nReturned quality metrics of the same key are to be compared.\nNote that only **real-value** metrics can be compared.\n\n- FATE script: ``Main`` always has three inputs:\n\n - config: job configuration, `JobConfig <../fate_client/pipeline/utils/tools.py#L64>`_ object loaded from "fate_test_config.yaml"\n - param: job parameter setting, dictionary loaded from "conf" file specified in benchmark testsuite\n - namespace: namespace suffix, user-given *namespace* or generated timestamp string when using *namespace-mangling*\n\n- non-FATE script: ``Main`` always has one input:\n\n - param: job parameter setting, dictionary loaded from "conf" file specified in benchmark testsuite\n\n\ndata\n----\n\n`Data` sub-command is used for upload or delete dataset in suite\'s.\n\ncommand options\n~~~~~~~~~~~~~~~\n\n.. code-block:: bash\n\n fate_test data --help\n\n1. include:\n\n .. code-block:: bash\n\n fate_test data [upload|delete] -i \n\n will upload/delete dataset in testsuites in *path1*\n\n2. exclude:\n\n .. code-block:: bash\n\n fate_test data [upload|delete] -i -e -e ...\n\n will upload/delete dataset in testsuites in *path1* but not in *path2* and *path3*\n\n3. glob:\n\n .. code-block:: bash\n\n fate_test data [upload|delete] -i -g "hetero*"\n\n will upload/delete dataset in testsuites in sub directory start with *hetero* of *path1*\n\n\nfull command options\n---------------------\n\n.. click:: fate_test.scripts.cli:cli\n :prog: fate_test\n :show-nested:\n', "author": "FederatedAI", diff --git a/python/federatedml/components/feldman_verifiable_sum.py b/python/federatedml/components/feldman_verifiable_sum.py deleted file mode 100644 index 446b54a7df..0000000000 --- a/python/federatedml/components/feldman_verifiable_sum.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2019 The FATE Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 - -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from .components import ComponentMeta - -feldman_verifiable_sum_cpn_meta = ComponentMeta("FeldmanVerifiableSum") - - -@feldman_verifiable_sum_cpn_meta.bind_param -def feldman_verifiable_sum_param(): - from federatedml.param.feldman_verifiable_sum_param import FeldmanVerifiableSumParam - - return FeldmanVerifiableSumParam - - -@feldman_verifiable_sum_cpn_meta.bind_runner.on_guest -def feldman_verifiable_sum_guest_runner(): - from federatedml.statistic.feldman_verifiable_sum.feldman_verifiable_sum_guest import ( - FeldmanVerifiableSumGuest, - ) - - return FeldmanVerifiableSumGuest - - -@feldman_verifiable_sum_cpn_meta.bind_runner.on_host -def feldman_verifiable_sum_host_runner(): - from federatedml.statistic.feldman_verifiable_sum.feldman_verifiable_sum_host import ( - FeldmanVerifiableSumHost, - ) - - return FeldmanVerifiableSumHost diff --git a/python/federatedml/components/secure_information_retrieval.py b/python/federatedml/components/secure_information_retrieval.py deleted file mode 100644 index 8e5b549b38..0000000000 --- a/python/federatedml/components/secure_information_retrieval.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2019 The FATE Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 - -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from .components import ComponentMeta - -secure_information_retrieval_cpn_meta = ComponentMeta("SecureInformationRetrieval") - - -@secure_information_retrieval_cpn_meta.bind_param -def secure_information_retrieval_param(): - from federatedml.param.sir_param import SecureInformationRetrievalParam - - return SecureInformationRetrievalParam - - -@secure_information_retrieval_cpn_meta.bind_runner.on_guest -def secure_information_retrieval_guest_runner(): - from federatedml.secure_information_retrieval.secure_information_retrieval_guest import ( - SecureInformationRetrievalGuest, - ) - - return SecureInformationRetrievalGuest - - -@secure_information_retrieval_cpn_meta.bind_runner.on_host -def secure_information_retrieval_host_runner(): - from federatedml.secure_information_retrieval.secure_information_retrieval_host import ( - SecureInformationRetrievalHost, - ) - - return SecureInformationRetrievalHost