aws / aws/sagemaker-python-sdk

SageMaker Local Mode: Error for network sagemaker-local

Đang mở
#4,659 2 bình luận 1 reaction 1 người được giao Được @mufaddal-rohawala nhận Xem trên GitHub
component: local mode 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**
Running the ScriptProcessor in local mode on either a desktop or notebook instance results in a RuntimeError when it reaches the 'docker compose up' command.

**To reproduce**
First run commands:
docker network rm sagemaker-local
docker network create sagemaker-local

```import boto3

sess = boto3.Session()
sm = sess.client("sagemaker")
s3_resource = boto3.resource("s3")
sagemaker_session = LocalSession()
config = {
"local": {
"local_code": True,
}
}
sagemaker_session.config = config
sagemaker_session.s3_resource = s3_resource
sagemaker_session.s3_client = sm

network_config = NetworkConfig(
enable_network_isolation=False,
security_group_ids=security_group_ids, # security group ids
subnets=subnets, # subnets
encrypt_inter_container_traffic=True,
)

script_processor = ScriptProcessor(
command=["bash", "process.sh"],
image_uri=image, # custom Docker image
role=role,
instance_count=1,
instance_type="local",
sagemaker_session=sagemaker_session,
network_config=network_config,
).run(...)
```

Just running 'docker rm sagemaker-local' and then the code in local mode is a workaround for the issue as of now.

**Expected behavior**
For the script processing job to run and output properly.

**Screenshots or logs**
![image](https://github.com/aws/sagemaker-python-sdk/assets/169085464/815afe9b-0b03-45ba-aa11-460eecca7eca)
![image](https://github.com/aws/sagemaker-python-sdk/assets/169085464/74dd6432-e899-4de7-9c75-f234de14d75e)

**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**:2.217.0
- **Python version**:3.11.4
- **Custom Docker image**:Y

**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.