Skip to content

fix(examples): use Session instance for region in train-inference-e2e#6050

Open
Hannah14295 wants to merge 1 commit into
aws:masterfrom
Hannah14295:fix/train-inference-e2e-session-region
Open

fix(examples): use Session instance for region in train-inference-e2e#6050
Hannah14295 wants to merge 1 commit into
aws:masterfrom
Hannah14295:fix/train-inference-e2e-session-region

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

The train-inference-e2e-example config cell read AWS_REGION off the Session class (AWS_REGION = Session.boto_region_name). boto_region_name is an instance @Property, so class access returns the property object rather than a region string; the subsequent
boto3.Session(region_name=AWS_REGION) then fails with 'TypeError: expected string or bytes-like object, got property' and PYTORCH_TRAINING_IMAGE is built with a bogus region.

Instantiate a Session and read the property off the instance.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The train-inference-e2e-example config cell read AWS_REGION off the
Session class (AWS_REGION = Session.boto_region_name). boto_region_name
is an instance @Property, so class access returns the property object
rather than a region string; the subsequent
boto3.Session(region_name=AWS_REGION) then fails with
'TypeError: expected string or bytes-like object, got property' and
PYTORCH_TRAINING_IMAGE is built with a bogus region.

Instantiate a Session and read the property off the instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants