Troubleshoot Neo Compilation Errors - Amazon SageMaker

Troubleshoot Neo Compilation Errors

This section contains information about how to understand and prevent common compilation errors, the error messages they generate, and guidance on how to resolve these errors.

How to Use This Page

Attempt to resolve your error by the going through these sections in the following order:

  1. Check that the input of your compilation job satisfies the input requirements. See What input data shapes does SageMaker Neo expect?

  2. Check common framework-specific errors.

  3. Check if your error is an infrastructure error.

  4. Check your compilation log.

Error Solution

InputConfiguration: No h5 file provided in <model path>

Check your h5 file is in the Amazon S3 URI you specified.

Or

Check that the h5 file is correctly formatted.

InputConfiguration: Multiple h5 files provided, <model path>, when only one is allowed

Check you are only providing one h5 file.

ClientError: InputConfiguration: Unable to load provided Keras model. Error: 'sample_weight_mode'

Check the Keras version you specified is supported. See, supported frameworks for cloud instances and edge devices.

ClientError: InputConfiguration: Input input has wrong shape in Input Shape dictionary. Input shapes should be provided in NCHW format.

Check that your model input follows NCHW format. See What input data shapes does SageMaker Neo expect?

Error Solution

ClientError: InputConfiguration: Only one parameter file is allowed for MXNet model. Please make sure the framework you select is correct.

SageMaker Neo will select the first parameter file given for compilation.

Error Solution

InputConfiguration: Exactly one .pb file is allowed for TensorFlow models.

Make sure you only provide one .pb or .pbtxt file.

InputConfiguration: Exactly one .pb or .pbtxt file is allowed for TensorFlow models.

Make sure you only provide one .pb or .pbtxt file.

ClientError: InputConfiguration: TVM cannot convert <model zoo> model. Please make sure the framework you selected is correct. The following operators are not implemented: {<operator name>}

Check the operator you chose is supported. See SageMaker Neo Supported Frameworks and Operators.

Error Solution

InputConfiguration: We are unable to extract DataInputConfig from the model due to input_config_derivation_error. Please override by providing a DataInputConfig during compilation job creation.

Do either of the following:

  • Specify the name and shape of the expected inputs by providing a DataInputConfig definition in your compilation request.

  • Investigate the error in Amazon CloudWatch Logs. Check the /aws/sagemaker/CompilationJobs log group and look for a log stream named compilationJobName/model-info-extraction.

Infrastructure-Related Errors

Error Solution

ClientError: InputConfiguration: S3 object does not exist. Bucket: <bucket>, Key: <bucket key>

Check the Amazon S3 URI your provided.

ClientError: InputConfiguration: Bucket <bucket name> is in region <region name> which is different from AWS Sagemaker service region <service region>

Create an Amazon S3 bucket that is in the same region as the service.

ClientError: InputConfiguration: Unable to untar input model. Please confirm the model is a tar.gz file

Check that your model in Amazon S3 is compressed into a tar.gz file.

Check your compilation log

  1. Navigate to Amazon CloudWatch at https://console.aws.amazon.com/cloudwatch/.

  2. Select the region you created the compilation job from the Region dropdown list in the top right.

  3. In the navigation pane of the Amazon CloudWatch, choose Logs. Select Log groups.

  4. Search for the log group called /aws/sagemaker/CompilationJobs. Select the log group.

  5. Search for the logstream named after the compilation job name. Select the log stream.