sagemaker-python-sdk
sagemaker-python-sdk copied to clipboard
DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
Describe the bug
The usage of SageMaker Python SDK by one of my team's packages leads to a lot of deprecation warnings that all seem related to originate in https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/amazon/record_pb2.py
They're of the form
venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:19: 10 warnings
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:19: DeprecationWarning: Call to deprecated create function FileDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
DESCRIPTOR = _descriptor.FileDescriptor(
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:36: 10 warnings
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:36: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:54: 10 warnings
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:54: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:72: 10 warnings
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:72: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:29: 10 warnings
.venv/lib/python3.8/site-packages/sagemaker/amazon/record_pb2.py:29: DeprecationWarning: Call to deprecated create function Descriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_FLOAT32TENSOR = _descriptor.Descriptor(
and that all seems to stem from the same root cause which is the usage of the deprecated FieldDescriptor()
https://github.com/protocolbuffers/protobuf/blob/main/python/google/protobuf/descriptor.py#L1035
Appreciate if you look into that and are able to resolve those deprecation warnings to SageMaker SDK users don't get them
Expected behavior
No deprecation warnings
System information A description of your system. Please provide:
- SageMaker Python SDK version: 2.105.0
- Framework name (eg. PyTorch) or algorithm (eg. KMeans): PyTorch