FATE icon indicating copy to clipboard operation
FATE copied to clipboard

homo_nn是否支持增加验证集导入

Open yueyueshine opened this issue 3 years ago • 3 comments

在dsl 和config中添加了验证集导入,然后在HomoNNClient类的fit函数中添加了validate_data参数,后面的代码也针对验证集做了对应修改,但是fateflow报错显示:TypeError: fit() takes 2 positional arguments but 3 were given

yueyueshine avatar Sep 21 '22 02:09 yueyueshine

fit接口是固定的,如果需要验证集 可以考虑dsl或者pipeline配置一下验证集 这里有个Homo的例子 https://github.com/FederatedAI/FATE/blob/master/examples/dsl/v2/homo_secureboost/test_secureboost_train_dsl.json

talkingwallace avatar Sep 21 '22 04:09 talkingwallace

按照例子进行了修改,还是报同样的错误 { "components": { "reader_0": { "module": "Reader", "output": { "data": [ "data" ] } }, "data_transform_0": { "module": "DataTransform", "input": { "data": { "data": [ "reader_0.data" ] } }, "output": { "data": [ "data" ], "model": [ "model" ] } }, "reader_1": { "module": "Reader", "output": { "data": [ "data" ] } }, "data_transform_1": { "module": "DataTransform", "input": { "data": { "data": [ "reader_1.data" ] }, "model": [ "data_transform_0.model" ] }, "output": { "data": [ "data" ], "model": [ "model" ] } }, "homo_nn_0": { "module": "HomoNN", "input": { "data": { "train_data": [ "data_transform_0.data" ], "validate_data": [ "data_transform_1.data" ] } }, "output": { "data": [ "data" ], "model": [ "model" ] } }, "evaluation_0": { "module": "Evaluation", "input": { "data": { "data": [ "homo_nn_0.data" ] } }, "output": { "data": [ "data" ] } } } }

yueyueshine avatar Sep 22 '22 09:09 yueyueshine

在HomoNN的 Server类中的fit函数的入参中添加*args可以解决这个问题

yueyueshine avatar Sep 23 '22 06:09 yueyueshine

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.

github-actions[bot] avatar Jul 09 '24 06:07 github-actions[bot]