Running Train a GPT-2 (or GPT Neo) Text-Generating Model w/ GPU on Colab

Viewed 144

When I start "Running Train a GPT-2 (or GPT Neo) Text-Generating Model w/ GPU on Colab" in my Colab, following error comes up:

ERROR: tensorflow 2.5.0 has requirement tensorboard~=2.5, but you'll have tensorboard 2.4.1 which is incompatible. ERROR: pytorch-lightning 1.3.8 has requirement PyYAML<=5.4.1,>=5.1, but you'll have pyyaml 3.13 which is incompatible.

What to do? Is it because of my Mac, or do I need to upgrade my Colab account would that help?

1 Answers

The problem comes from the default packages installed in the Colab environment. I does not depend on the platform you are using to access Colab or on the type of your subscription.

You have to upgrade the Python packages using pip.

In general you can run shell commands like pip in Colab prepending a ! character, so in your case the following lines should be sufficient to fix the problem

!pip install tensorboard==2.5
!pip install pyyaml==5.4.1

If you need to run more shell commands, you can use more user-friedly methods (see the answers to this question).

Related