Help us improve the AWS re:Post Knowledge Center by sharing your feedback in a brief survey. Your input can influence how we create and update our content to better support your AWS journey.
ModuleNotFoundError when starting a training job on Sagemaker
0
I want to submit a training job on sagemaker. I tried it on notebook and it works. When I try the following I get ModuleNotFoundError: No module named 'nltk'
finetune-T5.py have many other libraries that are not installed. How can I install the missing library? Or is there a better way to run the training job?
Are these answers helpful? Upvote the correct answer to help the community benefit from your knowledge.
0
Accepted Answer
Check out this link (Using third-party libraries section) on how to install third-party libraries for training jobs. You need to create requirement.txt file in the same directory as your training script to install other dependencies at runtime.
I tried adding nltk to requirements.txt file in scripts directory which worked for another module but not nltk; what could I be doing wrong?