Skip to content

Commit

Permalink
Edge case: empty rules config
Browse files Browse the repository at this point in the history
  • Loading branch information
dstnluong committed Jul 10, 2020
1 parent a94f809 commit 8128572
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/aws/sagemaker/common/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ def wait_for_training_job(client, training_job_name, poll_interval=31):
response = client.describe_training_job(TrainingJobName=training_job_name)
status = response['TrainingJobStatus']
# Ensure all rules have finished
rules_status = all(map(lambda debug_rule: debug_rule['RuleEvaluationStatus'] != "InProgress", response['DebugRuleEvaluationStatuses']))
if response['DebugRuleEvaluationStatuses']:
rules_status = all(map(lambda debug_rule: debug_rule['RuleEvaluationStatus'] != "InProgress", response['DebugRuleEvaluationStatuses']))
else:
rules_status = True
if status == 'Completed' and rules_status:
logging.info("Training job ended with status: " + status)
logging.info("Rules have ended with status: ")
Expand Down

0 comments on commit 8128572

Please sign in to comment.