Skip to content

Commit 744257b

Browse files
committed
Linting
1 parent e816d67 commit 744257b

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

src/sagemaker/local/entities.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ def start(self, **kwargs):
671671
self._executions[execution_id] = execution
672672
logger.info(
673673
"Starting execution for pipeline %s. Execution ID is %s",
674-
self.pipeline.name, execution_id
674+
self.pipeline.name,
675+
execution_id,
675676
)
676677
self.last_modified_time = datetime.datetime.now().timestamp()
677678

@@ -743,7 +744,9 @@ def update_execution_failure(self, step_name, failure_message):
743744
self.last_modified_time = datetime.datetime.now().timestamp()
744745
logger.info(
745746
"Pipeline execution %s FAILED because step "
746-
"'%s' failed.", self.pipeline_execution_name, step_name
747+
"'%s' failed.",
748+
self.pipeline_execution_name,
749+
step_name,
747750
)
748751

749752
def update_step_properties(self, step_name, step_properties):

src/sagemaker/model_monitor/model_monitoring.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def latest_monitoring_statistics(self, file_name=STATISTICS_JSON_DEFAULT_FILE_NA
676676
if len(executions) == 0:
677677
logger.warning(
678678
"No executions found for schedule. monitoring_schedule_name: %s",
679-
self.monitoring_schedule_name
679+
self.monitoring_schedule_name,
680680
)
681681
return None
682682

@@ -703,7 +703,7 @@ def latest_monitoring_constraint_violations(
703703
if len(executions) == 0:
704704
logger.warning(
705705
"No executions found for schedule. monitoring_schedule_name: %s",
706-
self.monitoring_schedule_name
706+
self.monitoring_schedule_name,
707707
)
708708
return None
709709

@@ -748,7 +748,7 @@ def list_executions(self):
748748
if len(monitoring_executions_dict["MonitoringExecutionSummaries"]) == 0:
749749
logger.warning(
750750
"No executions found for schedule. monitoring_schedule_name: %s",
751-
self.monitoring_schedule_name
751+
self.monitoring_schedule_name,
752752
)
753753
return []
754754

@@ -2435,7 +2435,7 @@ def latest_monitoring_statistics(self):
24352435
if len(executions) == 0:
24362436
logger.warning(
24372437
"No executions found for schedule. monitoring_schedule_name: %s",
2438-
self.monitoring_schedule_name
2438+
self.monitoring_schedule_name,
24392439
)
24402440
return None
24412441

@@ -2447,7 +2447,8 @@ def latest_monitoring_statistics(self):
24472447
status = latest_monitoring_execution.describe()["ProcessingJobStatus"]
24482448
logger.warning(
24492449
"Unable to retrieve statistics as job is in status '%s'. Latest statistics only "
2450-
"available for completed executions.", status
2450+
"available for completed executions.",
2451+
status,
24512452
)
24522453

24532454
def latest_monitoring_constraint_violations(self):
@@ -2464,7 +2465,7 @@ def latest_monitoring_constraint_violations(self):
24642465
if len(executions) == 0:
24652466
logger.warning(
24662467
"No executions found for schedule. monitoring_schedule_name: %s",
2467-
self.monitoring_schedule_name
2468+
self.monitoring_schedule_name,
24682469
)
24692470
return None
24702471

@@ -2475,7 +2476,8 @@ def latest_monitoring_constraint_violations(self):
24752476
status = latest_monitoring_execution.describe()["ProcessingJobStatus"]
24762477
logger.warning(
24772478
"Unable to retrieve constraint violations as job is in status '%s'. Latest "
2478-
"violations only available for completed executions.", status
2479+
"violations only available for completed executions.",
2480+
status,
24792481
)
24802482

24812483
@staticmethod

src/sagemaker/model_monitor/monitoring_files.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def from_s3_uri(cls, statistics_file_s3_uri, kms_key=None, sagemaker_session=Non
130130
"\nCould not retrieve statistics file at location '%s'. "
131131
"To manually retrieve Statistics object from a given uri, "
132132
"use 'my_model_monitor.statistics(my_s3_uri)' or "
133-
"'Statistics.from_s3_uri(my_s3_uri)'", statistics_file_s3_uri
133+
"'Statistics.from_s3_uri(my_s3_uri)'",
134+
statistics_file_s3_uri,
134135
)
135136
raise error
136137

@@ -260,7 +261,8 @@ def from_s3_uri(cls, constraints_file_s3_uri, kms_key=None, sagemaker_session=No
260261
"\nCould not retrieve constraints file at location '%s'. "
261262
"To manually retrieve Constraints object from a given uri, "
262263
"use 'my_model_monitor.constraints(my_s3_uri)' or "
263-
"'Constraints.from_s3_uri(my_s3_uri)'", constraints_file_s3_uri
264+
"'Constraints.from_s3_uri(my_s3_uri)'",
265+
constraints_file_s3_uri,
264266
)
265267
raise error
266268

tests/integ/timeout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ def _delete_schedules_associated_with_endpoint(sagemaker_session, endpoint_name)
203203
except Exception as e:
204204
logger.warning(
205205
"Failed to delete monitor %s,\nError: %s",
206-
monitor.monitoring_schedule_name, e
206+
monitor.monitoring_schedule_name,
207+
e,
207208
)
208209

209210

0 commit comments

Comments
 (0)