-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Passing ParameterString for Estimator output_path fails in Pipeline definition #3104
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
Comments
related #3078 |
@lkev PR 3111 should fix this issue, can you try it out and let us know? |
So I came across two issues here: Issue 1
Traceback (most recent call last):
File "/smtest.py", line 1, in <module>
import sagemaker
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/__init__.py", line 18, in <module>
from sagemaker import estimator, parameter, tuner # noqa: F401
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/estimator.py", line 27, in <module>
from sagemaker import git_utils, image_uris, vpc_utils
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/image_uris.py", line 24, in <module>
from sagemaker.spark import defaults
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/spark/__init__.py", line 16, in <module>
from sagemaker.spark.processing import PySparkProcessor, SparkJarProcessor # noqa: F401
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/spark/processing.py", line 35, in <module>
from sagemaker.local.image import _ecr_login_if_needed, _pull_image
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/local/__init__.py", line 16, in <module>
from .local_session import ( # noqa: F401
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/local/local_session.py", line 23, in <module>
from sagemaker.local.image import _SageMakerContainer
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/local/image.py", line 38, in <module>
import sagemaker.local.data
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/local/data.py", line 26, in <module>
import sagemaker.amazon.common
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/amazon/common.py", line 23, in <module>
from sagemaker.amazon.record_pb2 import Record
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/sagemaker/amazon/record_pb2.py", line 36, in <module>
_descriptor.FieldDescriptor(
File "/opt/miniconda3/envs/smenv2/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates Issue 2
param_training_output_s3_uri = ParameterString(
name="training_output_s3_uri"
) to param_training_output_s3_uri = ParameterString(
name="training_output_s3_uri",
default_value="s3://my-bucket/my-path/"
) , it ignores this path and uploads to the regular default anyway (again in my case tries to upload to |
potentially related #3149 |
@lkev if you do have default value, you can just hard code and pass it to the |
Describe the bug
Passing a
ParameterString
parameter in theoutput
arg forEstimator
throws an error when defining it as part of a pipeline.This is because the estimator attempts to parse the
ParameterString
as an s3 URL and obviously fails.To reproduce
Expected behavior
The pipeline definition printed out
Screenshots or logs
The
ParameterString
gets passed toparse_s3_url(self.output_path)
in theEstimator
(line 699). However, it can't parse as it as an s3 url as it is aParameterString
object.See error log below of above code below:
System information
A description of your system. Please provide:
Additional context
Potentially related to #3091 or #3078.
The text was updated successfully, but these errors were encountered: