Fix pydantic incompatiblity causing test failures #982
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Seeing a failure because of an incompatibility between pydantic and sagemaker causing the error
ERROR torchx/schedulers/test/aws_sagemaker_scheduler_test.py - NameError: Field name "json" shadows a BaseModel attribute; use a different field name with "alias='json'".
eg. https://github.com/pytorch/torchx/actions/runs/12147832511/job/33874943758This diff pins the sagemaker version to avoid this
Test plan:
Ran
pytest torchx/schedulers/test/aws_sagemaker_scheduler_test.py
, also CI tests pass (docs and pyre errors are pre-existing)