aws / aws/amazon-sagemaker-examples

[Bug Report] Broken Notebook - Extractive Question Answering

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

Description

**Link to the notebook**
[Add the link to the notebook.](https://github.com/aws/amazon-sagemaker-examples/blob/main/introduction_to_amazon_algorithms/jumpstart_question_answering/Amazon_JumpStart_Question_Answering.ipynb)

**Describe the bug**
The notebook is linked above is failing due to a deprecated jump start model version. The error seems misleading as the latest version is 1.2.1. Same results when using "star" (*) to pick the latest.

```
DeprecatedJumpStartModelError: Version '1.2.1' of JumpStart model 'pytorch-eqa-bert-base-uncased' is deprecated. Please try targetting a higher version of the model.
```

**To reproduce**
- Run the first 5 cells and you will see the error on cell 5
- Kernel image running in sagemaker studio: Data Science, also tried with Data Science 3.0.

**Logs**
If applicable, add logs to help explain your problem.
You may also attach an `.ipynb` file to this issue if it includes relevant logs or output.
```
---------------------------------------------------------------------------
DeprecatedJumpStartModelError Traceback (most recent call last)
Cell In[9], line 16
13 inference_instance_type = "ml.m5.xlarge"
15 # Retrieve the inference docker container uri.
---> 16 deploy_image_uri = image_uris.retrieve(
17 region=None,
18 framework=None,
19 image_scope="inference",
20 model_id=infer_model_id,
21 model_version=infer_model_version,
22 instance_type=inference_instance_type,
23 )
24 # Retrieve the inference script uri.
25 deploy_source_uri = script_uris.retrieve(
26 model_id=infer_model_id, model_version=infer_model_version, script_scope="inference"
27 )

File /opt/conda/lib/python3.10/site-packages/sagemaker/workflow/utilities.py:388, in override_pipeline_parameter_var..wrapper(*args, **kwargs)
386 logger.warning(warning_msg_template, arg_name, func_name, type(value))
387 kwargs[arg_name] = value.default_value
--> 388 return func(*args, **kwargs)

File /opt/conda/lib/python3.10/site-packages/sagemaker/image_uris.py:133, in retrieve(framework, region, version, py_version, instance_type, accelerator_type, image_scope, container_version, distribution, base_framework_version, training_compiler_config, model_id, model_version, tolerate_vulnerable_model, tolerate_deprecated_model, sdk_version, inference_tool, serverless_inference_config)
126 raise ValueError(
127 "When retrieving the image_uri, the argument %s should not be a pipeline variable "
128 "(%s) since pipeline variables are only interpreted in the pipeline execution time."
129 % (name, type(val))
130 )
132 if is_jumpstart_model_input(model_id, model_version):
--> 133 return artifacts._retrieve_image_uri(
134 model_id,
135 model_version,
136 image_scope,
137 framework,
138 region,
139 version,
140 py_version,
141 instance_type,
142 accelerator_type,
143 container_version,
144 distribution,
145 base_framework_version,
146 training_compiler_config,
147 tolerate_vulnerable_model,
148 tolerate_deprecated_model,
149 )
151 if training_compiler_config and (framework in [HUGGING_FACE_FRAMEWORK, "pytorch"]):
152 final_image_scope = image_scope

File /opt/conda/lib/python3.10/site-packages/sagemaker/jumpstart/artifacts.py:110, in _retrieve_image_uri(model_id, model_version, image_scope, framework, region, version, py_version, instance_type, accelerator_type, container_version, distribution, base_framework_version, training_compiler_config, tolerate_vulnerable_model, tolerate_deprecated_model)
107 if region is None:
108 region = JUMPSTART_DEFAULT_REGION_NAME
--> 110 model_specs = verify_model_region_and_return_specs(
111 model_id=model_id,
112 version=model_version,
113 scope=image_scope,
114 region=region,
115 tolerate_vulnerable_model=tolerate_vulnerable_model,
116 tolerate_deprecated_model=tolerate_deprecated_model,
117 )
119 if image_scope == JumpStartScriptScope.INFERENCE:
120 ecr_specs = model_specs.hosting_ecr_specs

File /opt/conda/lib/python3.10/site-packages/sagemaker/jumpstart/utils.py:395, in verify_model_region_and_return_specs(model_id, version, scope, region, tolerate_vulnerable_model, tolerate_deprecated_model)
393 if model_specs.deprecated:
394 if not tolerate_deprecated_model:
--> 395 raise DeprecatedJumpStartModelError(model_id=model_id, version=version)
396 LOGGER.warning("Using deprecated JumpStart model '%s' and version '%s'.", model_id, version)
398 if scope == constants.JumpStartScriptScope.INFERENCE.value and model_specs.inference_vulnerable:

DeprecatedJumpStartModelError: Version '1.2.1' of JumpStart model 'pytorch-eqa-bert-base-uncased' is deprecated. Please try targetting a higher version of the model.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.