FATE
FATE copied to clipboard
homo_nn是否支持增加验证集导入
在dsl 和config中添加了验证集导入,然后在HomoNNClient类的fit函数中添加了validate_data参数,后面的代码也针对验证集做了对应修改,但是fateflow报错显示:TypeError: fit() takes 2 positional arguments but 3 were given
fit接口是固定的,如果需要验证集 可以考虑dsl或者pipeline配置一下验证集 这里有个Homo的例子 https://github.com/FederatedAI/FATE/blob/master/examples/dsl/v2/homo_secureboost/test_secureboost_train_dsl.json
按照例子进行了修改,还是报同样的错误
{ "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" ] } } } }
在HomoNN的 Server类中的fit函数的入参中添加*args可以解决这个问题
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.