Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lynne0012006 opened this issue Aug 6, 2024 · 0 comments
Open

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

lynne0012006 opened this issue Aug 6, 2024 · 0 comments

Comments

@lynne0012006
Copy link

问题描述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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant