Skip to content

Fix handler service #152

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

nikhil-sk
Copy link
Contributor

Issue #, if available:
In cases where the model_fn does not return a model of type mx.module.BaseModule or mx.gluon.block.Block [see the method _user_module_transformer()], the model load succeeds, but the self._service object does not get assigned any transformer, leading to the error message:

'W-9000-model-stdout com.amazonaws.ml.mms.wlm.WorkerLifeCycle - AttributeError: 'NoneType' object has no attribute 'transform'

This PR addresses the issue by:

  1. Removing the initialization of self._service to None in the mxnet handler, as it's already initialized in the base handler from which it inherits.
  2. Raises the ValueError that is thrown by _user_module_transformer() to clarify the issue in case users use a non-mxnet model. Recommends them to use TorchServe for non-mxnet workloads (as the closest neighbor of MMS).

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-mxnet-inference-container-pr
  • Commit ID: 66c9f92
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-mxnet-inference-toolkit-pr
  • Commit ID: 66c9f92
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-mxnet-inference-container-pr
  • Commit ID: 168f8f2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-mxnet-inference-toolkit-pr
  • Commit ID: 168f8f2
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants