Skip to content

Commit

Permalink
Try using 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sawyerh committed Sep 1, 2024
1 parent 134acfb commit b67a5ed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 42 deletions.
2 changes: 1 addition & 1 deletion aws/ai/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.10.14
python 3.11.9
nodejs 20.13.1
34 changes: 2 additions & 32 deletions aws/ai/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions aws/ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ authors = ["Sawyer <[email protected]>"]
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
openai = "^1.43.0"
tenacity = "^8.2.2"
jiter = "^0.5.0"

[tool.poetry.group.dev.dependencies]
aws-lambda-powertools = {extras = ["all"], version = "^2.19.0"} # included in Lambda layer
awswrangler = "^3.2.1" # included in Lambda layer
numpy = "^1.25.0" # included in Lambda layer
pandas = "^2.0.3" # included in Lambda layer
aws-lambda-powertools = {extras = ["all"], version = "^2.43.1"} # included in Lambda layer
awswrangler = "^3.9.1" # included in Lambda layer
numpy = "^1.26.4" # included in Lambda layer
pandas = "^2.2.2" # included in Lambda layer
openai = { version = "^1.43.0", extras = ["embeddings"] } # not using embeddings utils in Lambda code
pytest = "^7.4.0"
pytest-watch = "^4.2.0"
Expand Down
10 changes: 6 additions & 4 deletions aws/ai/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ frameworkVersion: "3"

provider:
name: aws
runtime: python3.10
architecture: x86_64
runtime: python3.11
# "...significantly better price and performance"
# https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html#foundation-arch-adv
architecture: arm64
# "faster and have no downsides (unless you specifically use the generated change sets).
# They will become the default in Serverless Framework 4."
deploymentMethod: direct
Expand Down Expand Up @@ -41,9 +43,9 @@ functions:
layers:
- !Ref PythonRequirementsLambdaLayer
# https://aws-sdk-pandas.readthedocs.io/en/stable/layers.html
- arn:aws:lambda:${aws:region}:336392948345:layer:AWSSDKPandas-Python310:20
- arn:aws:lambda:${aws:region}:336392948345:layer:AWSSDKPandas-Python311-Arm64:17
# https://docs.powertools.aws.dev/lambda/python/latest/
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:79
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:79
environment:
EMBEDDINGS_S3_BUCKET: highlights.sawyerh.com
EMBEDDINGS_S3_KEY: ai/embeddings.parquet
Expand Down

0 comments on commit b67a5ed

Please sign in to comment.