Skip to content

ModuleNotFoundError when training the model  #238

@marloeshagens

Description

@marloeshagens

Hi guys, I am working on finetuning a GPT-2 in Google Collab to use in (behavioral) research, but I am very new to this and I don't understand what's going on. I have been using it without errors for a few weeks now, but now the algorithm does not cooperate with me anymore lol :)

Traceback (most recent call last):
File "./train.py", line 14, in
import model, sample, encoder
File "/content/gpt-2/src/model.py", line 3, in
from tensorflow.contrib.training import HParams
ModuleNotFoundError: No module named 'tensorflow.contrib'

I've tried to import tensorflow.contrib manually (import tensorflow.contrib) but it does not solve the problem. Also, I have tried to see which tensorflow was installed, uninstalled and reinstalled newer versions but it still does not work.

Can someone please help me? Thanks so much. If needed, here is the google collab link:

Cheers,
Marloes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions