Datasets: Colab Notebook breaks when downloading the squad dataset

Created on 30 May 2020  路  6Comments  路  Source: huggingface/datasets

When I run the notebook in Colab
https://colab.research.google.com/github/huggingface/nlp/blob/master/notebooks/Overview.ipynb
breaks when running this cell:
image

All 6 comments

The notebook forces version 0.1.0. If I use the latest, things work, I'll run the whole notebook and create a PR.

But in the meantime, this issue gets fixed by changing:
!pip install nlp==0.1.0
to
!pip install nlp

It still breaks very near the end

image

When you install nlp for the first time on a Colab runtime, it updates the pyarrow library that was already on colab. This update shows this message on colab:

WARNING: The following packages were previously imported in this runtime:
  [pyarrow]
You must restart the runtime in order to use newly installed versions.

You just have to restart the runtime and it should be fine.
If you don't restart, then it breaks like in your first message

Thanks for reporting the second one ! We'll update the notebook to fix this one :)

This trick from @thomwolf seems to be the most reliable solution to fix this colab notebook issue:

# install nlp
!pip install -qq nlp==0.2.0

# Make sure that we have a recent version of pyarrow in the session before we continue - otherwise reboot Colab to activate it
import pyarrow
if int(pyarrow.__version__.split('.')[1]) < 16:
    import os
    os.kill(os.getpid(), 9)

The second part got fixed here: 2cbc656d6fc4b18ce57eac070baec05b31180d39

Thanks! I'm then closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregburman picture gregburman  路  7Comments

donggyukimc picture donggyukimc  路  5Comments

elyase picture elyase  路  7Comments

NielsRogge picture NielsRogge  路  3Comments

dpressel picture dpressel  路  7Comments