-
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
chore: bump-pydantic to 2.3.0 #375
Conversation
429fc44
to
ac833b6
Compare
/e2e |
This comment was marked as outdated.
This comment was marked as outdated.
/e2e --refs substrafl=chore/bump-to-pydantic-2 |
/e2e --refs substrafl=chore/bump-to-pydantic-2 substra=chore/bump-to-pydantic-2 substra-tests=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmark mnist,camelyon |
Something happened while processing your message: error: unknown option '--benchmark' |
/e2e --refs substrafl=chore/bump-to-pydantic-2 substra=chore/bump-to-pydantic-2 substra-tests=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon |
/e2e --refs substrafl=chore/bump-to-pydantic-2 substra=chore/bump-to-pydantic-2 substra-tests=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon |
End to end tests: ❌ FAILURE Jobs status:
“Success is not final; failure is not fatal: It is the courage to continue that counts.” ―- Winston S. Churchill |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon |
End to end tests: ❌ FAILURE “You shall not pass!” ― Gandalf, The Lord of the Rings, The Fellowship of the Ring |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon --mode standalone |
FL-1068 Support pydantic v2.0
ContextFollowing the recent release of pydantic v2.0 and related changelog, the code need to be adapted. In particular, some methods have been deprecated like More details here. Specification
Acceptance criteriaTests passing on Documentation examples relying on both CI passing on e2e distributed, standalone, benchmark tests and documentation examples with |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon --mode standalone |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon --mode standalone |
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist,camelyon --mode standalone |
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
011535a
to
1110146
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 the upgrade 🙏
substra/__version__.py
Outdated
@@ -1 +1 @@ | |||
__version__ = "0.47.0" | |||
__version__ = "0.47.0.dev2" |
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.
Comment to change that in the merged version (I guess it's to get e2e tests passing)
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
/e2e --refs substrafl=chore/bump-to-pydantic-2,substra=chore/bump-to-pydantic-2,substra-tests=chore/bump-to-pydantic-2,substra-backend=chore/bump-to-pydantic-2 --tests sdk,substrafl --benchmarks mnist --mode standalone |
End to end tests: ✔️ SUCCESS Awesome sauce! |
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
@@ -602,7 +602,10 @@ def _output_from_spec(outputs: Dict[str, schemas.ComputeTaskOutputSpec]) -> Dict | |||
|
|||
|
|||
def _schemas_list_to_models_list(inputs: Any, model: Any) -> Any: | |||
return [model.model_validate(input_schema.model_dump()) for input_schema in inputs] | |||
if inputs: |
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.
can inputs
be None?
If it's always an iterable, you don't need the conditional
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.
Yes, for instance in TaskSpec
, inputs is given as "optional". In practice, it does not looks lite to be none sometimes but I added the condition to match the typing
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.
minor but I feel the flow is slightly more readable with
if not inputs:
return []
return [model.model_validate(input_schema.model_dump()) for input_schema in inputs]
(reduce nested statements)
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, don't forget to adjust the version number
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
# Companion PR - Substra/substra#375 (main) - Substra/substrafl#159 - Substra/substra-tests#272 - #718 --------- Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
Companion PR
closes FL-1068