File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ class TrainingJobAnalytics(AnalyticsMetricsBase):
199
199
"""Fetch training curve data from CloudWatch Metrics for a specific training job.
200
200
"""
201
201
202
- CLOUDWATCH_NAMESPACE = '/aws/sagemaker/HyperParameterTuningJobs '
202
+ CLOUDWATCH_NAMESPACE = '/aws/sagemaker/TrainingJobs '
203
203
204
204
def __init__ (self , training_job_name , metric_names = None , sagemaker_session = None ):
205
205
"""Initialize a ``TrainingJobAnalytics`` instance.
@@ -246,7 +246,12 @@ def _determine_timeinterval(self):
246
246
"""
247
247
description = self ._sage_client .describe_training_job (TrainingJobName = self .name )
248
248
start_time = description [u'TrainingStartTime' ] # datetime object
249
- end_time = description .get (u'TrainingEndTime' , datetime .datetime .utcnow ())
249
+ # Incrementing end time by 1 min since cloud watch drops seconds before finding the logs.
250
+ # This results in logs being searched in the time range in which the correct log line was not present.
251
+ # Example - Log time - 2018-10-22 08:25:55
252
+ # Here calculated end time would also be 2018-10-22 08:25:55 (without 1 min addition)
253
+ # CW will consider end time as 2018-10-22 08:25 and will not be able to search the correct log.
254
+ end_time = description .get (u'TrainingEndTime' , datetime .datetime .utcnow ()) + datetime .timedelta (minutes = 1 )
250
255
return {
251
256
'start_time' : start_time ,
252
257
'end_time' : end_time ,
You can’t perform that action at this time.
0 commit comments