Skip to content

Commit 7f86d3d

Browse files
committed
Added: print out billable seconds after training completes
1 parent 157d867 commit 7f86d3d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sagemaker/session.py

+3
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,9 @@ def logs_for_job(self, job_name, wait=False, poll=5): # noqa: C901 - suppress c
648648
if dot:
649649
print()
650650
print('===== Job Complete =====')
651+
# Customers are not billed for hardware provisioning, so billable time is less than total time
652+
billable_time = (description['TrainingEndTime'] - description['TrainingStartTime']) * instance_count
653+
print('Billable seconds:', int(billable_time.total_seconds()) + 1)
651654

652655

653656
def container_def(image, model_data_url=None, env=None):

0 commit comments

Comments
 (0)