Skip to content

使用dag发起homo_nn 和 hetero_nn训练流程 #580

@lynne0012006

Description

@lynne0012006

问题描述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:
      • homo_nn_1
        parameters:
        metrics:
        • auc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions