Installing Pytorch Transformers in AWS Sagemaker
I'm trying to install the pytorch transformers package for my AWS Sagemaker notebook instance. However, it keeps giving me error of "No Module Found" for the package when i run my entry point script. 

I saw in an example for TensorFlowModel which requires to set up env but for Pytorch it is not the case (How do I load python modules which are not available in Sagemaker?). Anyway, below is my code :

estimator = PyTorch(entry_point='model.py',
                role=role,
                framework_version='1.4.0',
                train_instance_count=2,
                train_instance_type='ml.c4.xlarge',
                source_dir = 'src',
                hyperparameters={
                    'train_path': 's3://bucket-train',
                    'validation_path': 's3://bucket-val',
                    'epochs': 3,
                    'backend': 'gloo'
                })


although you may be running that command from a SageMaker notebook, the training job you launch with the PyTorch estimator does not run on the notebook. It runs on remote, ephemeral infrastructure. You need to install your package on that remote machine. You need to add in the srcsource directory a requirements.txt file that contains the list of extra packages you want to install, such as the transformers package
