Skip to content

Commit

Permalink
linter formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Feb 9, 2024
1 parent 1bdb407 commit 7eaa7a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def sageworks_featureset_policy(self) -> iam.ManagedPolicy:
"""In SageMaker, certain operations, such as creating training jobs, endpoint deployments, or batch transform jobs,
require SageMaker to assume an IAM role. This role provides SageMaker with permissions to access AWS resources
on your behalf, such as reading training data from S3, writing model artifacts, or logging to CloudWatch."""

def sagemaker_pass_role_policy_statement(self) -> iam.PolicyStatement:
"""Create a policy statement for SageMaker to assume the Execution Role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ def _serverless_deploy(self, model_package_arn, mem_size=2048, max_concurrency=5
)
except ClientError as e:
# Already Exists: Check if ValidationException and existing endpoint configuration
if e.response['Error']['Code'] == 'ValidationException' and \
"already existing endpoint configuration" in e.response['Error']['Message']:
if (
e.response["Error"]["Code"] == "ValidationException"
and "already existing endpoint configuration" in e.response["Error"]["Message"]
):
self.log.warning("Endpoint configuration already exists: Deleting and retrying...")
self.sm_client.delete_endpoint_config(EndpointConfigName=endpoint_name)
self.sm_client.create_endpoint_config(
Expand Down

0 comments on commit 7eaa7a5

Please sign in to comment.