From 9802e358b96ff7a5a901fc3e68593e3fa94dd22a Mon Sep 17 00:00:00 2001 From: kiarash kiani Date: Mon, 23 Sep 2024 10:26:32 +0200 Subject: [PATCH] chore(llm): add docstrings to all methods --- src/damavand/cloud/aws/resources/vllm_component.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/damavand/cloud/aws/resources/vllm_component.py b/src/damavand/cloud/aws/resources/vllm_component.py index 8618f8e..5bffdf0 100644 --- a/src/damavand/cloud/aws/resources/vllm_component.py +++ b/src/damavand/cloud/aws/resources/vllm_component.py @@ -243,6 +243,8 @@ def api(self) -> aws.apigateway.RestApi: @property @cache def api_resource(self) -> aws.apigateway.Resource: + """Return a resource for the API Gateway.""" + return aws.apigateway.Resource( resource_name=f"{self._name}-api-resource", opts=ResourceOptions(parent=self), @@ -254,6 +256,8 @@ def api_resource(self) -> aws.apigateway.Resource: @property @cache def api_method(self) -> aws.apigateway.Method: + """Return a method for the API Gateway.""" + return aws.apigateway.Method( resource_name=f"{self._name}-api-method", opts=ResourceOptions(parent=self), @@ -290,6 +294,7 @@ def api_access_sagemaker_role(self) -> aws.iam.Role: @property @cache def api_integration(self) -> aws.apigateway.Integration: + """Return a sagemaker integration for the API Gateway.""" return aws.apigateway.Integration( resource_name=f"{self._name}-api-integration", @@ -306,6 +311,8 @@ def api_integration(self) -> aws.apigateway.Integration: @property @cache def api_integration_response(self) -> aws.apigateway.IntegrationResponse: + """Return a sagemaker integration response for the API Gateway.""" + return aws.apigateway.IntegrationResponse( resource_name=f"{self._name}-api-integration-response", opts=ResourceOptions(parent=self, depends_on=[self.api_integration]), @@ -318,6 +325,8 @@ def api_integration_response(self) -> aws.apigateway.IntegrationResponse: @property @cache def api_method_response(self) -> aws.apigateway.MethodResponse: + """Return a sagemaker method response for the API Gateway.""" + return aws.apigateway.MethodResponse( resource_name=f"{self._name}-api-method-response", opts=ResourceOptions(parent=self), @@ -330,6 +339,8 @@ def api_method_response(self) -> aws.apigateway.MethodResponse: @property @cache def api_deploy(self) -> aws.apigateway.Deployment: + """Return an API deployment for the API Gateway.""" + return aws.apigateway.Deployment( resource_name=f"{self._name}-api-deploy", opts=ResourceOptions(