Substra/substra

Incomplete JSON file schema in add compute_plan --help

Closed this issue · 4 comments

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.

Related backend issue : Substra/substra-backend#148

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?

Alright, I'll fix this 🙂

The only part of this issue that hasn't been fixed by #104 and #105 is described in #124.
I'm closing this issue to avoid duplicates.