Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23247

Install a local copied Huggingface transformers package to Google Colab

$
0
0

I want to modify some huggingface models to do some experiments. How should I import my modified transformers package in colab?

What I want to do is to change the model code to output some internal values, but I still want to use the huggingface transformers' flows. Or is there any other way I can do this?

I cloned the huggingface transformers repository to my own github repository:https://github.com/tianhua2/my_huggingface

Then in colab, I did:!pip install git+https://github.com/tianhua2/my_huggingfaceThis command runs fine.

Then I didimport my_huggingfacefrom my_huggingface import BigBirdForMaskedLM, BigBirdTokenizerFast

it shows errorImportError: cannot import name 'BigBirdForMaskedLM' from 'my_huggingface' (unknown location)


Viewing all articles
Browse latest Browse all 23247

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>