Sagemaker:ImportError:运行培训脚本时没有名为“ pandas”的模块

时间:2020-04-29 17:34:19

标签: python amazon-sagemaker

目前,我正在运行这个确切的笔记本:https://github.com/udacity/sagemaker-deployment/blob/master/Project/SageMaker%20Project.ipynb

只是具有不同的数据集(我得到的格式与笔记本中看到的完全相同)。

当我打电话给估算器时,我得到了错误:

2020-04-29 17:18:03 Starting - Starting the training job...
2020-04-29 17:18:06 Starting - Launching requested ML instances...
2020-04-29 17:19:03 Starting - Preparing the instances for training......
2020-04-29 17:19:54 Downloading - Downloading input data
2020-04-29 17:19:54 Training - Downloading the training image.bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell



2020-04-29 17:20:13,936 sagemaker-containers ERROR    ExecuteUserScriptError:
Command "/usr/bin/python -m train --epochs 10 --hidden_dim 200"
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/ml/code/train.py", line 11, in <module>
    import pandas as pd
ImportError: No module named 'pandas'

2020-04-29 17:20:25 Uploading - Uploading generated training model
2020-04-29 17:20:25 Failed - Training job failed
---------------------------------------------------------------------------
UnexpectedStatusException                 Traceback (most recent call last)
<ipython-input-37-0e8223086435> in <module>()
----> 1 estimator.fit({'training': input_data})

~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/sagemaker/estimator.py in fit(self, inputs, wait, logs, job_name, experiment_config)
    475         self.jobs.append(self.latest_training_job)
    476         if wait:
--> 477             self.latest_training_job.wait(logs=logs)
    478 
    479     def _compilation_job_name(self):

~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/sagemaker/estimator.py in wait(self, logs)
   1084         # If logs are requested, call logs_for_jobs.
   1085         if logs != "None":
-> 1086             self.sagemaker_session.logs_for_job(self.job_name, wait=True, log_type=logs)
   1087         else:
   1088             self.sagemaker_session.wait_for_job(self.job_name)

~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/sagemaker/session.py in logs_for_job(self, job_name, wait, poll, log_type)
   3042 
   3043         if wait:
-> 3044             self._check_job_status(job_name, description, "TrainingJobStatus")
   3045             if dot:
   3046                 print()

~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/sagemaker/session.py in _check_job_status(self, job, desc, status_key_name)
   2636                 ),
   2637                 allowed_statuses=["Completed", "Stopped"],
-> 2638                 actual_status=status,
   2639             )
   2640 

UnexpectedStatusException: Error for Training job sagemaker-pytorch-2020-04-29-17-18-03-379: Failed. Reason: AlgorithmError: ExecuteUserScriptError:
Command "/usr/bin/python -m train --epochs 10 --hidden_dim 200"
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/ml/code/train.py", line 11, in <module>
    import pandas as pd
ImportError: No module named 'pandas'

有人对我可以解决此问题有任何见解吗?

0 个答案:

没有答案