From 299177e5f7a356acd1e1133663375ffaab3f498b Mon Sep 17 00:00:00 2001 From: xDemon Date: Tue, 6 Jun 2023 13:30:58 +0800 Subject: [PATCH] Update deploy_model.py deploy add exclude_cpn_list param Signed-off-by: xDemon --- python/fate_flow/pipelined_model/deploy_model.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/python/fate_flow/pipelined_model/deploy_model.py b/python/fate_flow/pipelined_model/deploy_model.py index 57c70c573..c539956c6 100644 --- a/python/fate_flow/pipelined_model/deploy_model.py +++ b/python/fate_flow/pipelined_model/deploy_model.py @@ -92,13 +92,10 @@ def deploy(config_data): ) else: train_dsl = json_loads(pipeline_model.train_dsl) - inference_dsl = parser.deploy_component( - config_data.get( - 'cpn_list', - list(train_dsl.get('components', {}).keys()), - ), - train_dsl, - ) + cpn_list = config_data.get('cpn_list', list(train_dsl.get('components', {}).keys()), ) + if 'exclude_cpn_list' in config_data: + cpn_list = list(set(cpn_list).difference(set(config_data.get('exclude_cpn_list', {})))) + inference_dsl = parser.deploy_component(cpn_list, train_dsl,) cpn_list = list(inference_dsl.get('components', {}).keys())