aws / aws/amazon-sagemaker-examples

Neo: Image-classification-fulltraining-highlevel-neo.ipynb and Image-classification-fulltraining-highlevel-neo-studio.ipynb issue

Open
#1,401 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

The [Image-classification-fulltraining-highlevel-neo.ipynb](https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker_neo_compilation_jobs/imageclassification_caltech/Image-classification-fulltraining-highlevel-neo.ipynb) and [Image-classification-fulltraining-highlevel-neo-studio.ipynb](https://github.com/awslabs/amazon-sagemaker-examples/blob/master/aws_sagemaker_studio/sagemaker_neo_compilation_jobs/imageclassification_caltech/Image-classification-fulltraining-highlevel-neo-studio.ipynb) notebooks break in both Studio and Notebook instance at the cell with the following script:
```
%%time
result = json.loads(ic_classifier.predict(payload))
```

```
---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
in

/opt/conda/lib/python3.7/site-packages/sagemaker/predictor.py in predict(self, data, initial_args, target_model, target_variant)
111
112 request_args = self._create_request_args(data, initial_args, target_model, target_variant)
--> 113 response = self.sagemaker_session.sagemaker_runtime_client.invoke_endpoint(**request_args)
114 return self._handle_response(response)
115

/opt/conda/lib/python3.7/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)

/opt/conda/lib/python3.7/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params)
633 error_code = parsed_response.get("Error", {}).get("Code")
634 error_class = self.exceptions.from_code(error_code)
--> 635 raise error_class(parsed_response, operation_name)
636 else:
637 return parsed_response

ValidationError: An error occurred (ValidationError) when calling the InvokeEndpoint operation: 1 validation error detected: Value at 'body' failed to satisfy constraint: Member must not be null
```

Contributor guide

Open the contributing guide

Research direction

Start with Image-classification-fulltraining-highlevel-neo.ipynb and Image-classification-fulltraining-highlevel-neo-studio.ipynb, reading the cells that prepare payload and call ic_classifier.predict(payload). Reproduce the failing cell in both environments and trace why the endpoint receives a null body; done means both notebooks run that cell without ValidationError and produce the expected prediction result.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, python
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.