I encountered an issue where HuggingFace’s Trainer() would not start when using Google Cloud’s Vertex AI Workbench.

A similar bug was reported on the following page:

https://stackoverflow.com/questions/73415068/huggingface-trainer-does-nothing-only-on-vertex-ai-workbench-works-on-colab

Initially, I had selected the “PyTorch” environment as shown below, and this is where the bug occurred:

As described in the article above, switching to the “Python” environment resolved the issue:

Note that when using this environment, you first need to run the following:

condainstallpytorchcudatoolkit=11.0-cpytorch

I hope this serves as a useful reference for anyone experiencing the same issue.