How to fix "ValueError: Need either a GLUE task or a training/validation file."

I’m not sure what is causing this error during training. I’m using the GLUE task, and I think I have the correct transformers version, but I keep getting this error when I try to train the model: “ValueError: Need either a GLUE task or a training/validation file.”

Here’s the notebook: aws-sagemaker-deploy-sentiment-analysis/huggingface_pl_sentiment_analysis.ipynb at main · JayThibs/aws-sagemaker-deploy-sentiment-analysis · GitHub

You are not passing your datasets to your training job when starting it using the sagemaker SDK.
Currently, you have # put this inside fit if using {'train': training_input_path, 'test': test_input_path}

=> Saying to sagemaker you are not passing data from s3.
You need to change this to{'train': training_input_path, 'test': test_input_path})

Hmm, unfortunately, it didn’t work. Still getting the same message.

Oh yeah, that’s because you use the which requires hyperparameter to be run, like the task.
Those are documented here. transformers/examples/pytorch/text-classification at master · huggingface/transformers · GitHub. You can also check the script directly to find the task mapping. transformers/examples/pytorch/text-classification at master · huggingface/transformers · GitHub