Skip to content

Specifying arguments=[] in SKLearnProcessor.run() causes Invalid length for parameter AppSpecification.ContainerArguments error  #1342

@cfregly

Description

@cfregly

This code:

sklearn_processor.run(code='preprocess-scikit.py',
                                       arguments=[])                     

Causes the following error:

---------------------------------------------------------------------------
ParamValidationError                      Traceback (most recent call last)
<ipython-input-88-829761199960> in <module>()
     12                       arguments=[],
     13                       logs=True,
---> 14                       wait=False)

~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/processing.py in run(self, code, inputs, outputs, arguments, wait, logs, job_name, experiment_config)
    402             inputs=normalized_inputs,
    403             outputs=normalized_outputs,
--> 404             experiment_config=experiment_config,
    405         )
    406         self.jobs.append(self.latest_job)

~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/processing.py in start_new(cls, processor, inputs, outputs, experiment_config)
    622 
    623         # Call sagemaker_session.process using the arguments dictionary.
--> 624         processor.sagemaker_session.process(**process_request_args)
    625 
    626         return cls(

~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/session.py in process(self, inputs, output_config, job_name, resources, stopping_condition, app_specification, environment, network_config, role_arn, tags, experiment_config)
    644         LOGGER.info("Creating processing-job with name %s", job_name)
    645         LOGGER.debug("process request: %s", json.dumps(process_request, indent=4))
--> 646         self.sagemaker_client.create_processing_job(**process_request)
    647 
    648     def create_monitoring_schedule(

~/anaconda3/envs/python3/lib/python3.6/site-packages/botocore/client.py in _api_call(self, *args, **kwargs)
    314                     "%s() only accepts keyword arguments." % py_operation_name)
    315             # The "self" in this scope is referring to the BaseClient.
--> 316             return self._make_api_call(operation_name, kwargs)
    317 
    318         _api_call.__name__ = str(py_operation_name)

~/anaconda3/envs/python3/lib/python3.6/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params)
    597         }
    598         request_dict = self._convert_to_request_dict(
--> 599             api_params, operation_model, context=request_context)
    600 
    601         service_id = self._service_model.service_id.hyphenize()

~/anaconda3/envs/python3/lib/python3.6/site-packages/botocore/client.py in _convert_to_request_dict(self, api_params, operation_model, context)
    645             api_params, operation_model, context)
    646         request_dict = self._serializer.serialize_to_request(
--> 647             api_params, operation_model)
    648         if not self._client_config.inject_host_prefix:
    649             request_dict.pop('host_prefix', None)

~/anaconda3/envs/python3/lib/python3.6/site-packages/botocore/validate.py in serialize_to_request(self, parameters, operation_model)
    295                                                     operation_model.input_shape)
    296             if report.has_errors():
--> 297                 raise ParamValidationError(report=report.generate_report())
    298         return self._serializer.serialize_to_request(parameters,
    299                                                      operation_model)

ParamValidationError: Parameter validation failed:
Invalid length for parameter AppSpecification.ContainerArguments, value: 0, valid range: 1-inf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions