Substra / substra-documentation

Documentation of the Substra software
https://docs.substra.org/
Apache License 2.0
21 stars 10 forks source link

fix: typo in go further examples #331

Closed ThibaultFy closed 1 year ago

ThibaultFy commented 1 year ago

closes FL-1119

linear[bot] commented 1 year ago
FL-1119 SubstraFL diabetes example fails in remote mode

# Context Running the SubstraFL diabetes example in substra-documentation in remote mode causes an error: ``` $ python run_diabetes_substrafl.py Dataset key for MyOrg2MSP: 4b2fd188-d300-4c0f-8a0a-9f7e5ad38911 Dataset key for MyOrg3MSP: be7d9933-7fad-4714-a319-1e16186a2718 2023-07-25 18:16:43,029 - INFO - Building the compute plan. 2023-07-25 18:16:43,029 - INFO - Registering the functions to Substra. 2023-07-25 18:16:43,767 - INFO - Registering the compute plan to Substra. 2023-07-25 18:16:43,768 - INFO - Experiment summary saved to /Users/oleobal/projects/documentation/substrafl_examples/go_further/tmp/experiment_summaries/2023_07_25_18_16_43_7e8db06b-a5d8-4fc9-a36b-e3d4fe98e2ee.json Requests error status 403: {"message":"OE0102: not authorized to process datamanager \"4b2fd188-d300-4c0f-8a0a-9f7e5ad38911\""} Traceback (most recent call last): File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/rest_client.py", line 103, in __request r.raise_for_status() File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.org-1.test-upgrade.cg.owkin.tech/task/bulk_create/ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/oleobal/projects/documentation/substrafl_examples/go_further/run_diabetes_substrafl.py", line 517, in compute_plan = execute_experiment( File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substrafl/experiment.py", line 342, in execute_experiment compute_plan = client.add_compute_plan( File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/client.py", line 48, in wrapper return f(*args, **kwargs) File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/client.py", line 518, in add_compute_plan return self._backend.add(spec, spec_options=spec_options) File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/backend.py", line 184, in add self._add_tasks_from_computeplan(spec, spec_options, auto_batching, batch_size) File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/backend.py", line 226, in _add_tasks_from_computeplan self._add_tasks(batch, spec_options) File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/backend.py", line 239, in _add_tasks return self._client.request( File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/rest_client.py", line 192, in request response = self._request( File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/utils.py", line 214, in wrapper return f(*args, **kwargs) File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/rest_client.py", line 148, in _request return self.__request(request_name, url, **request_kwargs) File "/Users/oleobal/projects/documentation/.venv/lib/python3.10/site-packages/substra/sdk/backends/remote/rest_client.py", line 121, in __request raise exceptions.AuthorizationError.from_request_exception(e) substra.sdk.exceptions.AuthorizationError: 403 Client Error: Forbidden for url: https://api.org-1.test-upgrade.cg.owkin.tech/task/bulk_create/: OE0102: not authorized to process datamanager "4b2fd188-d300-4c0f-8a0a-9f7e5ad38911" ``` The error disappears by editing permissions line 128: ``` # from permissions_dataset = Permissions(public=False, authorized_ids=DATA_PROVIDER_ORGS_ID) # to permissions_dataset = Permissions(public=True, authorized_ids=DATA_PROVIDER_ORGS_ID) ``` # Specification # Acceptance criteria The SubstraFL diabetes example runs successfully