-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add summary task pydantic validator #350
Conversation
60e7a18
to
6ae1eb9
Compare
7409af4
to
c0456dc
Compare
…ew backend API Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
c0456dc
to
94f1c4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! I am not sure about the abridged
term. As much I can appreciate its meaning, I don't know if it would be understand correctly by most people. I don't know if SummaryTask
would be better, or renaming the previous task as InterfacedTask
/TaskWithInterface
TaskWithIO
. Maybe other @Substra/code-owners can give their opinion?
tests/datastore.py
Outdated
"start_date": "2021-11-12T09:28:06.947765800Z", | ||
"end_date": "2021-11-12T09:30:04.705947400Z", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the unit tests were testing more than what they are actually 😅
I'll create an issue about that and revert those changes.
Not perfectly happy with the naming either, maybe renaming the object with the previous as |
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
6de1097
to
07230e5
Compare
substra/sdk/backends/local/dal.py
Outdated
@@ -147,9 +147,15 @@ def list( | |||
"""Joins the results of the [local db](substra.sdk.backends.local.db.list) and the | |||
[remote db](substra.sdk.backends.rest_client.list) in hybrid mode. | |||
""" | |||
local_assets = self._db.list(type_=type_, filters=filters, order_by=order_by, ascending=ascending) | |||
if type_ == schemas.Type.SummaryTask: | |||
# for the local DB, we need to map the abridged task type to the regular task type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# for the local DB, we need to map the abridged task type to the regular task type | |
# for the local DB, we need to map the summary task type to the regular task type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
51ccbd8
to
5225d92
Compare
Related issue
Substra/substra-backend#613
Summary
Fix calls to the API (substra-backend), adding a SummaryTask Pydantic validator to handle the new return format for lists of compute tasks.
Notes
A lot of changes are just replacements
list()
->[]
. Can be reviewed commit by commit to avoid noise.Please check if the PR fulfills these requirements