Skip to content

Commit dbcd7e7

Browse files
ajaykarpurknakad
authored andcommitted
feature: Add jobs list to Estimator (#229)
This adds a list of training jobs to the Estimator.
1 parent 696aa24 commit dbcd7e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sagemaker/estimator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def __init__(
216216
self.output_path = output_path
217217
self.output_kms_key = output_kms_key
218218
self.latest_training_job = None
219+
self.jobs = []
219220
self.deploy_instance_type = None
220221

221222
self._compiled_models = {}
@@ -337,6 +338,7 @@ def fit(self, inputs=None, wait=True, logs=True, job_name=None):
337338
self._prepare_for_training(job_name=job_name)
338339

339340
self.latest_training_job = _TrainingJob.start_new(self, inputs)
341+
self.jobs.append(self.latest_training_job)
340342
if wait:
341343
self.latest_training_job.wait(logs=logs)
342344

0 commit comments

Comments
 (0)