Incomplete JSON file schema in add compute_plan --help
Closed this issue · 4 comments
maeldebon commented
When using the substra add compute_plan --help
command, the JSON file schema provided is the following:
{
"traintuples": list[{
"algo_key": str,
"data_manager_key": str,
"train_data_sample_keys": list[str],
"traintuple_id": str,
"in_models_ids": list[str],
"tag": str,
}],
"composite_traintuples": list[{
"algo_key": str,
"data_manager_key": str,
"train_data_sample_keys": list[str],
"in_head_model_id": str,
"in_trunk_model_id": str,
"out_trunk_model_permissions": {
"authorized_ids": list[str],
},
"tag": str,
}]
"aggregatetuples": list[{
"algo_key": str,
"worker": str,
"in_models_ids": list[str],
"tag": str,
}],
"testtuples": list[{
"objective_key": str,
"data_manager_key": str,
"test_data_sample_keys": list[str],
"testtuple_id": str,
"traintuple_id": str,
"tag": str,
}]
}
But when I try to reproduce this schema and to add a compute_plan
, I get this error:
Requests error status 400: {"composite_traintuples":[{"composite_traintuple_id":["This field is required."],"out_trunk_model_permissions":{"public":["This field is required."]}}],"aggregatetuples":[{"aggregatetuple_id":["This field is required."]}]}
Error: Request failed: InvalidRequest: 400 Client Error: Bad Request for url: http://substra-backend.node-1.com/compute_plan/
Looks like some fields are missing in the example.
jmorel commented
Related backend issue : Substra/substra-backend#148
jmorel commented
After a closer look at this issue, it looks like you are right that composite_traintuple_id and aggregatetuple_id are missing from the documentation.
It also looks like testtuple_id is included but it shouldn't.
Could you also check that the SDK and the CLI documentation are in line?
maeldebon commented
Alright, I'll fix this 🙂