From 5d28c3d90f8b1d3e29581ea3b58603fe9ea55145 Mon Sep 17 00:00:00 2001 From: Alain Krok Date: Wed, 10 Apr 2024 09:26:13 -0500 Subject: [PATCH 1/3] chore(oss): increase retry attempts for index management (#372) chore(oss): increase retry attempts for index management in oss --- .../custom_resources/opensearch_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda/opensearch-serverless-custom-resources/custom_resources/opensearch_index.py b/lambda/opensearch-serverless-custom-resources/custom_resources/opensearch_index.py index 4230576a..6cbcc594 100644 --- a/lambda/opensearch-serverless-custom-resources/custom_resources/opensearch_index.py +++ b/lambda/opensearch-serverless-custom-resources/custom_resources/opensearch_index.py @@ -159,7 +159,7 @@ def create_index(client: OpenSearch, index_name: str, mapping: dict[str, str]) - # Add retry on AuthorizationException to mitigate policy creation race condition @retry( retry=retry_if_exception_type(AuthorizationException), - stop=stop_after_attempt(10), + stop=stop_after_attempt(30), wait=wait_exponential_jitter(1, 3), ) def handle_create( @@ -184,7 +184,7 @@ def handle_create( @retry( retry=retry_if_exception_type(AuthorizationException), - stop=stop_after_attempt(3), + stop=stop_after_attempt(30), wait=wait_exponential_jitter(1, 3), ) def handle_delete(client: OpenSearch, index_name: str): From 23934976d801e0c1a9d701396b1b27460c3d20a0 Mon Sep 17 00:00:00 2001 From: emerging-tech-cdk-constructs-bot <146136861+emerging-tech-cdk-constructs-bot@users.noreply.github.com> Date: Wed, 10 Apr 2024 07:26:32 -0700 Subject: [PATCH 2/3] chore(deps): upgrade list of models and DLC images (#371) Upgrade list of models and DLC images. See details in [workflow run]. [Workflow Run]: https://github.com/awslabs/generative-ai-cdk-constructs/actions/runs/8623930375 ------ *Automatically created by projen via the "code-generation" workflow* Signed-off-by: github-actions Co-authored-by: github-actions --- apidocs/classes/DeepLearningContainerImage.md | 7 +++++++ .../deep-learning-container-image.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/apidocs/classes/DeepLearningContainerImage.md b/apidocs/classes/DeepLearningContainerImage.md index b2e3e9ec..15647935 100644 --- a/apidocs/classes/DeepLearningContainerImage.md +++ b/apidocs/classes/DeepLearningContainerImage.md @@ -75,6 +75,7 @@ https://github.com/aws/deep-learning-containers/blob/master/available_images.md - [HUGGINGFACE\_PYTORCH\_TGI\_INFERENCE\_2\_1\_1\_TGI1\_3\_3\_GPU\_PY310\_CU121\_UBUNTU20\_04](DeepLearningContainerImage.md#huggingface_pytorch_tgi_inference_2_1_1_tgi1_3_3_gpu_py310_cu121_ubuntu20_04) - [HUGGINGFACE\_PYTORCH\_TGI\_INFERENCE\_2\_1\_1\_TGI1\_4\_0\_GPU\_PY310\_CU121\_UBUNTU20\_04](DeepLearningContainerImage.md#huggingface_pytorch_tgi_inference_2_1_1_tgi1_4_0_gpu_py310_cu121_ubuntu20_04) - [HUGGINGFACE\_PYTORCH\_TGI\_INFERENCE\_2\_1\_1\_TGI1\_4\_2\_GPU\_PY310\_CU121\_UBUNTU22\_04](DeepLearningContainerImage.md#huggingface_pytorch_tgi_inference_2_1_1_tgi1_4_2_gpu_py310_cu121_ubuntu22_04) +- [HUGGINGFACE\_PYTORCH\_TGI\_INFERENCE\_2\_1\_1\_TGI1\_4\_5\_GPU\_PY310\_CU121\_UBUNTU22\_04](DeepLearningContainerImage.md#huggingface_pytorch_tgi_inference_2_1_1_tgi1_4_5_gpu_py310_cu121_ubuntu22_04) - [HUGGINGFACE\_TENSORFLOW\_INFERENCE\_2\_11\_0\_TRANSFORMERS4\_26\_0\_CPU\_PY39\_UBUNTU20\_04](DeepLearningContainerImage.md#huggingface_tensorflow_inference_2_11_0_transformers4_26_0_cpu_py39_ubuntu20_04) - [HUGGINGFACE\_TENSORFLOW\_INFERENCE\_2\_11\_0\_TRANSFORMERS4\_26\_0\_GPU\_PY39\_CU112\_UBUNTU20\_04](DeepLearningContainerImage.md#huggingface_tensorflow_inference_2_11_0_transformers4_26_0_gpu_py39_cu112_ubuntu20_04) - [HUGGINGFACE\_TENSORFLOW\_INFERENCE\_2\_11\_1\_TRANSFORMERS4\_26\_0\_CPU\_PY39\_UBUNTU20\_04](DeepLearningContainerImage.md#huggingface_tensorflow_inference_2_11_1_transformers4_26_0_cpu_py39_ubuntu20_04) @@ -467,6 +468,12 @@ ___ ___ +### HUGGINGFACE\_PYTORCH\_TGI\_INFERENCE\_2\_1\_1\_TGI1\_4\_5\_GPU\_PY310\_CU121\_UBUNTU22\_04 + +▪ `Static` `Readonly` **HUGGINGFACE\_PYTORCH\_TGI\_INFERENCE\_2\_1\_1\_TGI1\_4\_5\_GPU\_PY310\_CU121\_UBUNTU22\_04**: [`ContainerImage`](ContainerImage.md) + +___ + ### HUGGINGFACE\_TENSORFLOW\_INFERENCE\_2\_11\_0\_TRANSFORMERS4\_26\_0\_CPU\_PY39\_UBUNTU20\_04 ▪ `Static` `Readonly` **HUGGINGFACE\_TENSORFLOW\_INFERENCE\_2\_11\_0\_TRANSFORMERS4\_26\_0\_CPU\_PY39\_UBUNTU20\_04**: [`ContainerImage`](ContainerImage.md) diff --git a/src/patterns/gen-ai/aws-model-deployment-sagemaker/deep-learning-container-image.ts b/src/patterns/gen-ai/aws-model-deployment-sagemaker/deep-learning-container-image.ts index 22638a79..6f56849d 100644 --- a/src/patterns/gen-ai/aws-model-deployment-sagemaker/deep-learning-container-image.ts +++ b/src/patterns/gen-ai/aws-model-deployment-sagemaker/deep-learning-container-image.ts @@ -72,6 +72,7 @@ export class DeepLearningContainerImage extends ContainerImage { public static readonly HUGGINGFACE_PYTORCH_TGI_INFERENCE_2_1_1_TGI1_3_3_GPU_PY310_CU121_UBUNTU20_04 = this.fromDeepLearningContainerImage('huggingface-pytorch-tgi-inference', '2.1.1-tgi1.3.3-gpu-py310-cu121-ubuntu20.04'); public static readonly HUGGINGFACE_PYTORCH_TGI_INFERENCE_2_1_1_TGI1_4_0_GPU_PY310_CU121_UBUNTU20_04 = this.fromDeepLearningContainerImage('huggingface-pytorch-tgi-inference', '2.1.1-tgi1.4.0-gpu-py310-cu121-ubuntu20.04'); public static readonly HUGGINGFACE_PYTORCH_TGI_INFERENCE_2_1_1_TGI1_4_2_GPU_PY310_CU121_UBUNTU22_04 = this.fromDeepLearningContainerImage('huggingface-pytorch-tgi-inference', '2.1.1-tgi1.4.2-gpu-py310-cu121-ubuntu22.04'); + public static readonly HUGGINGFACE_PYTORCH_TGI_INFERENCE_2_1_1_TGI1_4_5_GPU_PY310_CU121_UBUNTU22_04 = this.fromDeepLearningContainerImage('huggingface-pytorch-tgi-inference', '2.1.1-tgi1.4.5-gpu-py310-cu121-ubuntu22.04'); public static readonly HUGGINGFACE_TENSORFLOW_INFERENCE_2_11_0_TRANSFORMERS4_26_0_CPU_PY39_UBUNTU20_04 = this.fromDeepLearningContainerImage('huggingface-tensorflow-inference', '2.11.0-transformers4.26.0-cpu-py39-ubuntu20.04'); public static readonly HUGGINGFACE_TENSORFLOW_INFERENCE_2_11_0_TRANSFORMERS4_26_0_GPU_PY39_CU112_UBUNTU20_04 = this.fromDeepLearningContainerImage('huggingface-tensorflow-inference', '2.11.0-transformers4.26.0-gpu-py39-cu112-ubuntu20.04'); public static readonly HUGGINGFACE_TENSORFLOW_INFERENCE_2_11_1_TRANSFORMERS4_26_0_CPU_PY39_UBUNTU20_04 = this.fromDeepLearningContainerImage('huggingface-tensorflow-inference', '2.11.1-transformers4.26.0-cpu-py39-ubuntu20.04'); From aaa78e302d968781002619079d71c8e7f5de3d08 Mon Sep 17 00:00:00 2001 From: emerging-tech-cdk-constructs-bot <146136861+emerging-tech-cdk-constructs-bot@users.noreply.github.com> Date: Wed, 10 Apr 2024 07:26:46 -0700 Subject: [PATCH 3/3] chore(deps): upgrade dependencies (#370) Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: https://github.com/awslabs/generative-ai-cdk-constructs/actions/runs/8623882344 ------ *Automatically created by projen via the "upgrade-main" workflow* Signed-off-by: github-actions Co-authored-by: github-actions --- package.json | 2 +- yarn.lock | 54 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index ba7513d3..1e9f8d40 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "constructs": "^10.3.0" }, "dependencies": { - "cdk-nag": "^2.28.84", + "cdk-nag": "^2.28.85", "deepmerge": "^4.3.1" }, "bundledDependencies": [ diff --git a/yarn.lock b/yarn.lock index b27ba5e2..41d50cb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1042,16 +1042,16 @@ integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/node@*": - version "20.12.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.5.tgz#74c4f31ab17955d0b5808cdc8fd2839526ad00b3" - integrity sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw== + version "20.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" + integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== dependencies: undici-types "~5.26.4" "@types/node@^18": - version "18.19.30" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.30.tgz#0b1e6f824ed7ce37ef6e56f8f0d7d0ec2847b327" - integrity sha512-453z1zPuJLVDbyahaa1sSD5C2sht6ZpHp5rgJNs+H8YGqhluCXcuOUmBYsAo0Tos0cHySJ3lVUGbGgLlqIkpyg== + version "18.19.31" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.31.tgz#b7d4a00f7cb826b60a543cebdbda5d189aaecdcd" + integrity sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA== dependencies: undici-types "~5.26.4" @@ -1414,9 +1414,9 @@ aws-sdk-mock@^5.9.0: traverse "^0.6.6" aws-sdk@^2.1231.0: - version "2.1595.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1595.0.tgz#a0babe4531e98eb15e987ccf5198884265353c00" - integrity sha512-ee0FaplSMz9Y6XJnnyDCHv6SLziJ2YCI4SsO0VRFUKK4Jtk/KErp20CJI/4ZsS+oz7k2/vQ3JqGQXCz95nU8Ww== + version "2.1596.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1596.0.tgz#606dcf063cad6992f0e78190983241475317c6a2" + integrity sha512-0C0TGFW3ANoZ1AkSKIIjTpEfN9WQ7jbwLODsdU2TIPkJBuv7UcOkTPuKoiowhi5sOFZmyx58SG3g12j+BJpyEg== dependencies: buffer "4.9.2" events "1.1.1" @@ -1604,10 +1604,10 @@ case@1.6.3, case@^1.6.3: resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -cdk-nag@^2.28.84: - version "2.28.84" - resolved "https://registry.yarnpkg.com/cdk-nag/-/cdk-nag-2.28.84.tgz#39f4961f251b94e0fc65826bb3c663688e7dce28" - integrity sha512-GRj7tjoomctFozzH0tFWOXRNaTf7mht01xu+bZzZ3794leJlZ8stl+Aw1D2RMSQy9CNGDsIxrUns5M4lQ1Hjjw== +cdk-nag@^2.28.85: + version "2.28.85" + resolved "https://registry.yarnpkg.com/cdk-nag/-/cdk-nag-2.28.85.tgz#5c46f9a25c159b29f828caeb387da59237f0d99a" + integrity sha512-p/c6if0QN/BDAbgqOt7NRT0aYys8sSZHiSg5DozknCte5+FiNMyqKbf1PtBXB2YOt6CwY6RaANFF9lZ+TLBNZQ== chalk@^2.4.2: version "2.4.2" @@ -2203,9 +2203,9 @@ downlevel-dts@^0.11.0: typescript next electron-to-chromium@^1.4.668: - version "1.4.730" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.730.tgz#5e382c83085b50b9c63cb08692e8fcd875c1b9eb" - integrity sha512-oJRPo82XEqtQAobHpJIR3zW5YO3sSRRkPz2an4yxi1UvqhsGm54vR/wzTFV74a3soDOJ8CKW7ajOOX5ESzddwg== + version "1.4.731" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.731.tgz#d3dc19f359045b750a1fb0bc42315a502d950187" + integrity sha512-+TqVfZjpRz2V/5SPpmJxq9qK620SC5SqCnxQIOi7i/U08ZDcTpKbT7Xjj9FU5CbXTMUb4fywbIr8C7cGv4hcjw== emittery@^0.13.1: version "0.13.1" @@ -5381,9 +5381,13 @@ to-regex-range@^5.0.1: is-number "^7.0.0" traverse@^0.6.6: - version "0.6.8" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.8.tgz#5e5e0c41878b57e4b73ad2f3d1e36a715ea4ab15" - integrity sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA== + version "0.6.9" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.9.tgz#76cfdbacf06382d460b76f8b735a44a6209d8b81" + integrity sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg== + dependencies: + gopd "^1.0.1" + typedarray.prototype.slice "^1.0.3" + which-typed-array "^1.1.15" trim-newlines@^3.0.0: version "3.0.1" @@ -5531,6 +5535,18 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" +typedarray.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz#bce2f685d3279f543239e4d595e0d021731d2d1a" + integrity sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-errors "^1.3.0" + typed-array-buffer "^1.0.2" + typed-array-byte-offset "^1.0.2" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"