aws / aws/sagemaker-python-sdk

Receiving configuration error when loading SageMaker Session

Đang mở
#4,403 2 bình luận 2 reaction 1 người được giao Được @mollyheamazon nhận Xem trên GitHub
component: pysdk-team type: bug
Ngôn ngữ chính
Python
Star
2.3k
Fork
1.3k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
35

Mô tả

**Describe the bug**
In SageMaker Studio within a SageMaker Notebook instance, we use the SageMaker Python SDK. When using the sagemaker library, we are receiving errors in the SageMaker session and other methods.

It looks like the session tries to read a default config file that doesn't exists.

Not sure how to mitigate the error, and prevent SageMaker to look at default config file.

**To reproduce**
We execute:
`from sagemaker.session import Session`

And receive the following message:
```
sagemaker.config INFO - Not applying SDK defaults from location: /etc/xdg/sagemaker/config.yaml
Unable to create default JumpStart SageMaker Session due to the following error: None is not of type 'string'

Failed validating 'type' in schema['properties']['SageMaker']['properties']['FeatureGroup']['properties']['Tags']['items']['properties']['Value']:
{'maxLength': 256,
'minLength': 0,
'pattern': '^[\\w\\s\\d_.:/=+\\-@]*$',
'type': 'string'}

On instance['SageMaker']['FeatureGroup']['Tags'][0]['Value']:
None.
```

Then later we execute:
`sagemaker_session = Session()`

And receive this error:
```
File /opt/conda/lib/python3.8/site-packages/jsonschema/validators.py:1308, in validate(instance, schema, cls, *args, **kwargs)
1306 error = exceptions.best_match(validator.iter_errors(instance))
1307 if error is not None:
-> 1308 raise error

ValidationError: None is not of type 'string'

Failed validating 'type' in schema['properties']['SageMaker']['properties']['FeatureGroup']['properties']['Tags']['items']['properties']['Value']:
{'maxLength': 256,
'minLength': 0,
'pattern': '^[\\w\\s\\d_.:/=+\\-@]*$',
'type': 'string'}

On instance['SageMaker']['FeatureGroup']['Tags'][0]['Value']:
None
```

**System information**
Using a SageMaker ml.t3.medium instance with a Data Science 3.0 kernel on SageMaker Studio within a SageMaker Notebook Instance. Using sagemaker version: 2.206.0

**Additional context**
Add any other context about the problem here.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.