Overview.ipynb throws exceptions with nlp 0.4.0
{'login': 'mandy-li', 'id': 23109219, 'node_id': 'MDQ6VXNlcjIzMTA5MjE5', 'avatar_url': 'https://avatars.githubusercontent.com/u/23109219?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/mandy-li', 'html_url': 'https://github.com/mandy-li', 'followers_url': 'https://api.github.com/users/mandy-li/followers', 'following_url': 'https://api.github.com/users/mandy-li/following{/other_user}', 'gists_url': 'https://api.github.com/users/mandy-li/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/mandy-li/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/mandy-li/subscriptions', 'organizations_url': 'https://api.github.com/users/mandy-li/orgs', 'repos_url': 'https://api.github.com/users/mandy-li/repos', 'events_url': 'https://api.github.com/users/mandy-li/events{/privacy}', 'received_events_url': 'https://api.github.com/users/mandy-li/received_events', 'type': 'User', 'site_admin': False}
[]
[]
Thanks for reporting this issue

There was a bug where numpy arrays would get returned instead of tensorflow tensors.
This is fixed on master.

I tried to re-run the colab and encountered this error instead:

```
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_tensor'
```

This is because the dataset returns a Tensor and not a RaggedTensor.
But I think we should always return a RaggedTensor unless the length of the sequence is fixed (it that case they can be stack into a Tensor). Hi, I got another error (on Colab):

```python
# You can read a few attributes of the datasets before loading them (they are python dataclasses)
from dataclasses import asdict

for key, value in asdict(datasets[6]).items():
    print('👉 ' + key + ': ' + str(value))

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-6-b8ace6c227a2> in <module>()
      2 from dataclasses import asdict
      3 
----> 4 for key, value in asdict(datasets[6]).items():
      5     print('👉 ' + key + ': ' + str(value))

/usr/local/lib/python3.6/dist-packages/dataclasses.py in asdict(obj, dict_factory)
   1008     """
   1009     if not _is_dataclass_instance(obj):
-> 1010         raise TypeError("asdict() should be called on dataclass instances")
   1011     return _asdict_inner(obj, dict_factory)
   1012 

TypeError: asdict() should be called on dataclass instances
``` Indeed we'll update the cola with the new release coming up this week.
with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions:


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-5-48907f2ad433> in <module>
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
      2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
      3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
      4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)

<ipython-input-5-48907f2ad433> in <dictcomp>(.0)
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
      2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
      3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
      4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)

AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor'
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/477/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}