Skip to content

Commit

Permalink
Updates for version v2.1.1
Browse files Browse the repository at this point in the history
Updates for version v2.1.1
  • Loading branch information
knihit authored Jan 11, 2023
2 parents c471251 + 92b7b05 commit 2227526
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [2.1.1] - 2023-01-11

### Updated

- Python runtime 3.10.
- Python libraries.

## [2.1.0] - 2022-11-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Upon successfully cloning the repository into your local development environment

### Prerequisites

- Python 3.8
- Python 3.10
- [AWS Command Line Interface](https://aws.amazon.com/cli/)
- Docker (required to build the AWS Lambda layer for Amazon SageMaker SDK)

Expand Down
1 change: 1 addition & 0 deletions source/lambdas/solution_helper/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
omit =
tests/*
setup.py
charset_normalizer/**
*/.venv-test/*
cdk.out/*
conftest.py
Expand Down
1 change: 1 addition & 0 deletions source/lambdas/solution_helper/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ chardet/
crhelper/
idna/
requests/
charset_normalizer/
# crhelper tests directory
tests/
urllib3/
2 changes: 1 addition & 1 deletion source/lambdas/solution_helper/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
crhelper==2.0.6
requests==2.24.0
requests==2.28.1
2 changes: 1 addition & 1 deletion source/lambdas/solution_helper/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
crhelper==2.0.6
requests==2.24.0
requests==2.28.1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def stackset_name():

@pytest.fixture()
def mocked_org_ids():
return ["Test-Org-Id"]
return ["ou-x9x7-xxx1xxx3"]


@pytest.fixture()
Expand Down
4 changes: 3 additions & 1 deletion source/lib/blueprints/byom/lambdas/inference/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ def handler(event, context):


def invoke(event_body, endpoint_name, sm_client=sagemaker_client):
# convert the payload to a string if it not a string (to support JSON input)
payload = event_body["payload"] if isinstance(event_body["payload"], str) else json.dumps(event_body["payload"])
response = sm_client.invoke_endpoint(
EndpointName=endpoint_name, Body=event_body["payload"], ContentType=event_body["content_type"]
EndpointName=endpoint_name, Body=payload, ContentType=event_body["content_type"]
)
logger.info(response)
predictions = response["Body"].read().decode()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
botocore==1.29.20
boto3==1.26.20
awscli==1.27.20
sagemaker==2.118.0
botocore==1.29.46
boto3==1.26.46
awscli==1.27.46
sagemaker==2.128.0
4 changes: 2 additions & 2 deletions source/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sagemaker==2.118.0
boto3==1.26.20
sagemaker==2.128.0
boto3==1.26.46
crhelper==2.0.6
pytest==7.2.0
pytest-cov==4.0.0
Expand Down

0 comments on commit 2227526

Please sign in to comment.