Skip to content

Commit

Permalink
chore(llm): add docstrings to all methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kkiani committed Sep 23, 2024
1 parent 43e2956 commit 9802e35
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/damavand/cloud/aws/resources/vllm_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down Expand Up @@ -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",
Expand All @@ -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]),
Expand All @@ -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),
Expand All @@ -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(
Expand Down

0 comments on commit 9802e35

Please sign in to comment.