Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

fix: Use default model name when model name is None #214

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

Conversation

saimidu
Copy link
Contributor

@saimidu saimidu commented Dec 7, 2021

Issue #, if available:

Description of changes:
The model_name parameter when making a non-MME inference request, in the presence of a user's inference script, is treated as None by the python service for SM inference. This means that the context passed to the inference handler does not have a valid model_name attribute.

Therefore, GRPC-based inference requests for a model cannot be programmatically configured, and must instead always be hardcoded in the user's inference script. This requirement makes it harder to compile a model, or to use it with SageMaker Inference Recommender to produce a Neo-compilation-compatible model.

This PR makes a change to tfs_utils.py to use the default_model_name, obtained from the TFS_DEFAULT_MODEL_NAME environment variable, as the final option in case the input model_name is None and the request attributes do not contain the model name.

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

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-tensorflow-serving-container-pr
  • Commit ID: 7387dc5
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-tensorflow-serving-container-pr
  • Commit ID: c3b0c56
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-tensorflow-serving-container-pr
  • Commit ID: b35ce3f
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-tensorflow-serving-container-pr
  • Commit ID: 7bdfd11
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-tensorflow-serving-container-pr
  • Commit ID: 2b75e86
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@sagemaker-bot
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-tensorflow-serving-container-pr
  • Commit ID: 5309257
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

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

Successfully merging this pull request may close these issues.

2 participants