FATE
FATE copied to clipboard
使用dag发起homo_nn 和 hetero_nn的训练流程
问题描述1:可以使用dag发起homo_nn 和 hetero_nn的训练流程吗?如果能发起,可不可以传一些dag案例作为参考? 问题描述2:下面dag发起test_nn_binary流程,运行到homo_nn_0组件时就报错“list indices must be integers or slices, not str”,应该怎么修改dag文件呢?
附1:报错内容: File "/data/projects/fate/fate/python/fate/components/components/nn/loader.py", line 165, in from_dict 166 module_name=data_dict["module_name"], 167 TypeError: list indices must be integers or slices, not str
附2:dag内容 dag: stage: train party_tasks: host_9999: parties: - role: host party_id: - '9999' tasks: reader_0: parameters: name: breast_homo_host namespace: experiment guest_10000: parties: - role: guest party_id: - '10000' tasks: reader_0: parameters: name: breast_homo_guest namespace: experiment parties:
- role: guest
party_id:
- '10000'
- role: host
party_id:
- '9999'
tasks:
reader_0:
stage: default
parties:
- role: guest
party_id:
- '10000'
- role: host
party_id:
- '9999' component_ref: reader homo_nn_1: inputs: data: train_data: task_output_artifact: output_artifact_key: output_data producer_task: reader_0 model: warm_start_model: task_output_artifact: output_artifact_key: output_model producer_task: homo_nn_0 component_ref: homo_nn dependent_tasks:
- homo_nn_0
- reader_0 parameters: {} homo_nn_0: inputs: data: train_data: task_output_artifact: output_artifact_key: output_data producer_task: reader_0 model: {} component_ref: homo_nn dependent_tasks:
- reader_0
parameters:
runner_conf:
training_args_conf:
num_train_epochs: 5
per_device_train_batch_size: 64
loss_conf: BCELoss
optimizer_conf:
lr: 0.01
type: Adam
model_conf:
- layers:
- in_features: 30 out_features: 16 type: Linear
- type: ReLU
- in_features: 16 out_features: 1 type: Linear
- type: Sigmoid type: Sequential task_type: binary algo: fedavg evaluation_0: stage: default inputs: data: input_datas: task_output_artifact: output_artifact_key: output_data producer_task: homo_nn_1 component_ref: evaluation dependent_tasks:
- layers:
- homo_nn_1
parameters:
metrics:
- auc
- role: guest
party_id:
- '9999'
tasks:
reader_0:
stage: default
parties:
不建议使用dag来定义流程了,可以参考下pipeline的例子
This issue has been marked as stale because it has been open for 365 days with no activity. If this issue is still relevant or if there is new information, please feel free to update or reopen it.
This issue was closed because it has been inactive for 1 days since being marked as stale. If this issue is still relevant or if there is new information, please feel free to update or reopen it.
不建议使用dag来定义流程了,可以参考下pipeline的例子
可以问问为啥么,是不兼容了吗