aws / aws/amazon-sagemaker-examples
scikit_bring_your_own: Failed Reason: AlgorithmError: Exit Code: 1
- Dominant language
- Jupyter Notebook
- Stars
- 11k
- Forks
- 7k
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 8
Description
Hello,
I'm trying to create a custom model similar to the example "scikit_bring_your_own" as given in AWS Sagemaker examples.
**Here's my code :**
data_location = sess.upload_data(outdir + 'train.tsv', bucket, prefix +'/training')
account = sess.boto_session.client('sts').get_caller_identity()['Account']
region = sess.boto_session.region_name
image = '{}.dkr.ecr.{}.amazonaws.com/sagemaker-onevsrest:latest'.format(account, region)
%%time
model = sage.estimator.Estimator(image,
role, 1, 'ml.m4.2xlarge',
output_path="s3://{}/output".format(sess.default_bucket()),
sagemaker_session=sess)
model.fit(data_location)
**The moment it starts executing the above, I get the below error:**
2019-05-10 10:27:41,022 : INFO : Creating training-job with name: sagemaker-onevsrest-2019-05-10-10-27-41-022
2019-05-10 10:27:41 Starting - Starting the training job...
2019-05-10 10:27:43 Starting - Launching requested ML instances......
2019-05-10 10:28:54 Starting - Preparing the instances for training...
2019-05-10 10:29:39 Downloading - Downloading input data...
2019-05-10 10:30:03 Training - Training image download completed. Training in progress.
2019-05-10 10:30:03 Uploading - Uploading generated training model
2019-05-10 10:30:03 Failed - Training job failed
exec: "train": executable file not found in $PATH
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in ()
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in fit(self, inputs, wait, logs, job_name)
234 self.latest_training_job = _TrainingJob.start_new(self, inputs)
235 if wait:
--> 236 self.latest_training_job.wait(logs=logs)
237
238 def _compilation_job_name(self):
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in wait(self, logs)
591 def wait(self, logs=True):
592 if logs:
--> 593 self.sagemaker_session.logs_for_job(self.job_name, wait=True)
594 else:
595 self.sagemaker_session.wait_for_job(self.job_name)
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/session.py in logs_for_job(self, job_name, wait, poll)
1219
1220 if wait:
-> 1221 self._check_job_status(job_name, description, 'TrainingJobStatus')
1222 if dot:
1223 print()
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/session.py in _check_job_status(self, job, desc, status_key_name)
915 reason = desc.get('FailureReason', '(No reason provided)')
916 job_type = status_key_name.replace('JobStatus', ' job')
--> 917 raise ValueError('Error for {} {}: {} Reason: {}'.format(job_type, job, status, reason))
918
919 def wait_for_endpoint(self, endpoint, poll=5):
ValueError: Error for Training job sagemaker-onevsrest-2019-05-10-10-27-41-022: Failed Reason: AlgorithmError: Exit Code: 1
Could anyone help me resolve the above error?
Thanks in advance!
Contributor guide
Research direction
Start with the scikit_bring_your_own example and reproduce the training job using the code and image details in the report. Investigate why the training container cannot find the `train` executable, then verify that the job progresses past image startup and completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter-notebook, python, scikit-learn
- Domain
- cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100