C2_W3_assignment_configuration_error

Executing the following cell:

from sagemaker.sklearn.processing import SKLearnProcessor

processor = SKLearnProcessor(
    framework_version='0.23-1',
    role=role,
    instance_type=processing_instance_type,
    instance_count=processing_instance_count,
    env={'AWS_DEFAULT_REGION': region},                             
)

returns this error:
The input argument instance_type of function (sagemaker.image_uris.retrieve) is a pipeline variable (<class 'sagemaker.workflow.parameters.ParameterString'>), which is not allowed. The default_value of this Parameter object will be used to override it. Please make sure the default_value is valid.

which evidently makes it impossible to continue the assignment! I also tried to restart the kernel and changed:

processing_instance_type = ParameterString(
    name="ProcessingInstanceType",
    #default_value="ml.c5.2xlarge",
    default_value="ml.t3.medium",  # chosen in the beginning!  
)

Cheers,

Hi,

  1. I didn’t get whether changing the default_value worked for you or not. Did it?
  2. I had no errors while running the code (I checked my solution). Did you run the !pip install --disable-pip-version-check -q sagemaker==2.35.0 command in the top cell?

Muhammad.

  1. No, I just wanted to emphasize on the fact that changing default_value wasn’t helpful!
  2. It doesn’t give error! but it seems that it doesn’t fix any problem (either executing it or not)