Skip to content

Pydantic warning regarding field name "json" #5114

Open
@tdingtalend

Description

@tdingtalend

Describe the bug
A clear and concise description of what the bug is.
When we run helm package, we get this warning:

[04/02/25 09:10:32] WARNING /opt/venv/lib/python3.12/site-packa warnings.py:112
ges/pydantic/_internal/_fields.py:1
98: UserWarning: Field name "json"
in "MonitoringDatasetFormat"
shadows an attribute in parent
"Base"
warnings.warn(

Looks like there is a duplicate name in MonitoringDatasetFormat
This only started happening when we upgraded the version of sagemaker from 2.221.1
to 2.243.0

To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be complete and runnable, if additional data is needed, please include them in the issue.

run helm package with sagemaker imported

Expected behavior
A clear and concise description of what you expected to happen.

No warning is shown

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.

[04/02/25 09:10:32] WARNING /opt/venv/lib/python3.12/site-packa warnings.py:112
ges/pydantic/_internal/_fields.py:1
98: UserWarning: Field name "json"
in "MonitoringDatasetFormat"
shadows an attribute in parent
"Base"
warnings.warn(

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.243.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): Torch
  • Framework version: 2.6.0+cpu
  • Python version: 3.12.7
  • CPU or GPU: Running this in docker using amd64/python:3.12.7-slim-bookworm
  • Custom Docker image (Y/N): N

Additional context
Add any other context about the problem here.

My first time opening an issue, so please let me know if you need more information!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions