[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
NONE
I still get this error on 2.9.0
<img width="1925" alt="image" src="https://user-images.githubusercontent.com/7208470/215597359-2f253c76-c472-4612-8099-d3a74d16eb29.png">

2023-01-30T21:19:03Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1409355169
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UAQ2h
https://api.github.com/repos/huggingface/datasets/issues/comments/1409355169/reactions
2023-01-30T21:19:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1409355169
https://avatars.githubusercontent.com/u/7208470?v=4
https://api.github.com/users/ntrpnr/events{/privacy}
https://api.github.com/users/ntrpnr/followers
https://api.github.com/users/ntrpnr/following{/other_user}
https://api.github.com/users/ntrpnr/gists{/gist_id}
https://github.com/ntrpnr
ntrpnr
MDQ6VXNlcjcyMDg0NzA=
https://api.github.com/users/ntrpnr/orgs
https://api.github.com/users/ntrpnr/received_events
https://api.github.com/users/ntrpnr/repos
https://api.github.com/users/ntrpnr/starred{/owner}{/repo}
https://api.github.com/users/ntrpnr/subscriptions
User
https://api.github.com/users/ntrpnr
public
MEMBER
Hi ! I just tested locally and or colab and it works fine for 2.9 on `sst2`.

Also the code that is shown in your stack trace is not present in the 2.9 source code - so I'm wondering how you installed `datasets` that could cause this ? (you can check by searching for `[0:{label_ids[-1] + 1}]` in the [2.9 codebase](https://github.dev/huggingface/datasets/tree/b5672a956d5de864e6f5550e493527d962d6ae55) - it doesn't find anything)

Anyway you can try uninstalling `datasets` and install it again
2023-01-31T10:20:34Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1410101313
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UDHBB
https://api.github.com/repos/huggingface/datasets/issues/comments/1410101313/reactions
2023-01-31T10:20:34Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1410101313
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
For what it's worth, I've also gotten this error on 2.9.0, and I've tried uninstalling an reinstalling
![Screenshot 2023-02-01 at 11 06 55 AM](https://user-images.githubusercontent.com/22944438/216126466-6934e8f8-0be4-41f4-9822-8436dfafd61c.png)

I'm very new to this package (I was following this tutorial: https://huggingface.co/docs/transformers/training), so there's a good chance I was doing something wrong 😅 but thought I'd pass along the feedback
2023-02-01T18:08:29Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1412502940
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UMRWc
https://api.github.com/repos/huggingface/datasets/issues/comments/1412502940/reactions
2023-02-01T18:08:29Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1412502940
https://avatars.githubusercontent.com/u/22944438?v=4
https://api.github.com/users/mtwichel/events{/privacy}
https://api.github.com/users/mtwichel/followers
https://api.github.com/users/mtwichel/following{/other_user}
https://api.github.com/users/mtwichel/gists{/gist_id}
https://github.com/mtwichel
mtwichel
MDQ6VXNlcjIyOTQ0NDM4
https://api.github.com/users/mtwichel/orgs
https://api.github.com/users/mtwichel/received_events
https://api.github.com/users/mtwichel/repos
https://api.github.com/users/mtwichel/starred{/owner}{/repo}
https://api.github.com/users/mtwichel/subscriptions
User
https://api.github.com/users/mtwichel
public
MEMBER
@ntrpnr @mtwichel Did you install `datasets` with conda ?

I suspect that `datasets` 2.9 on conda still have this issue for some reason. When I install `datasets` with `pip` I don't have this error.
2023-02-01T18:11:33Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1412507345
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UMSbR
https://api.github.com/repos/huggingface/datasets/issues/comments/1412507345/reactions
2023-02-01T18:11:33Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1412507345
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
> @ntrpnr @mtwichel Did you install datasets with conda ?

I did yeah, I wonder if that's the issue
2023-02-01T18:35:16Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1412535557
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UMZUF
https://api.github.com/repos/huggingface/datasets/issues/comments/1412535557/reactions
2023-02-01T18:35:16Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1412535557
https://avatars.githubusercontent.com/u/22944438?v=4
https://api.github.com/users/mtwichel/events{/privacy}
https://api.github.com/users/mtwichel/followers
https://api.github.com/users/mtwichel/following{/other_user}
https://api.github.com/users/mtwichel/gists{/gist_id}
https://github.com/mtwichel
mtwichel
MDQ6VXNlcjIyOTQ0NDM4
https://api.github.com/users/mtwichel/orgs
https://api.github.com/users/mtwichel/received_events
https://api.github.com/users/mtwichel/repos
https://api.github.com/users/mtwichel/starred{/owner}{/repo}
https://api.github.com/users/mtwichel/subscriptions
User
https://api.github.com/users/mtwichel
public
MEMBER
I just checked on conda at https://anaconda.org/HuggingFace/datasets/files

and everything looks fine, I got
```python

f"ClassLabel expected a value for all label ids [0:{int(label_ids[-1]) + 1}] but some ids are missing."
```
as expected in features.py line 1760 (notice the "int()") to not have the TypeError.

From where on conda did you install `datasets` ? You should use the `HuggingFace` official channel

edit: the conda-forge one [here](https://anaconda.org/conda-forge/datasets/files) seems ok as well
2023-02-01T18:42:43Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1412544268
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UMbcM
https://api.github.com/repos/huggingface/datasets/issues/comments/1412544268/reactions
2023-02-01T18:48:13Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1412544268
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Could you also try this in your notebook ? In case your python kernel doesn't match the `pip` environment in your shell
```python
import datasets; datasets.__version__
```
and
```
!which python
```
```python
import sys; sys.executable
```
2023-02-01T18:52:38Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1412555147
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UMeGL
https://api.github.com/repos/huggingface/datasets/issues/comments/1412555147/reactions
2023-02-01T18:54:05Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1412555147
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Mmmm, just a potential clue:

Where are you running your Python code? Is it the Spyder IDE?

I have recently seen some users reporting conflicting Python environments while using Spyder...

Maybe related:
- #5487
2023-02-02T12:52:28Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1413696853
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UQ01V
https://api.github.com/repos/huggingface/datasets/issues/comments/1413696853/reactions
2023-02-02T12:52:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1413696853
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
MEMBER
Other potential clue:
- Had you already imported `datasets` before pip-updating it? You should first update datasets, before importing it. Otherwise, you need to restart the kernel after updating it.
2023-02-02T13:03:14Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1413709862
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5UQ4Am
https://api.github.com/repos/huggingface/datasets/issues/comments/1413709862/reactions
2023-02-02T13:03:14Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1413709862
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
I installed `datasets` with Conda using `conda install datasets` and got this issue.

Then I tried to reinstall using
`
conda install -c huggingface -c conda-forge datasets
`
The issue is now fixed.
2023-02-08T10:25:01Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1422368460
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5Ux57M
https://api.github.com/repos/huggingface/datasets/issues/comments/1422368460/reactions
2023-02-08T10:25:01Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1422368460
https://avatars.githubusercontent.com/u/40721190?v=4
https://api.github.com/users/Kaifu96/events{/privacy}
https://api.github.com/users/Kaifu96/followers
https://api.github.com/users/Kaifu96/following{/other_user}
https://api.github.com/users/Kaifu96/gists{/gist_id}
https://github.com/Kaifu96
Kaifu96
MDQ6VXNlcjQwNzIxMTkw
https://api.github.com/users/Kaifu96/orgs
https://api.github.com/users/Kaifu96/received_events
https://api.github.com/users/Kaifu96/repos
https://api.github.com/users/Kaifu96/starred{/owner}{/repo}
https://api.github.com/users/Kaifu96/subscriptions
User
https://api.github.com/users/Kaifu96
public
NONE
I'm still getting this error on 2.13.0
2023-06-21T18:45:38Z
https://github.com/huggingface/datasets/issues/5406#issuecomment-1601394689
https://api.github.com/repos/huggingface/datasets/issues/5406
IC_kwDODunzps5fc1gB
https://api.github.com/repos/huggingface/datasets/issues/comments/1601394689/reactions
2023-06-21T18:45:38Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1601394689
https://avatars.githubusercontent.com/u/88870491?v=4
https://api.github.com/users/throughthetrees/events{/privacy}
https://api.github.com/users/throughthetrees/followers
https://api.github.com/users/throughthetrees/following{/other_user}
https://api.github.com/users/throughthetrees/gists{/gist_id}
https://github.com/throughthetrees
throughthetrees
MDQ6VXNlcjg4ODcwNDkx
https://api.github.com/users/throughthetrees/orgs
https://api.github.com/users/throughthetrees/received_events
https://api.github.com/users/throughthetrees/repos
https://api.github.com/users/throughthetrees/starred{/owner}{/repo}
https://api.github.com/users/throughthetrees/subscriptions
User
https://api.github.com/users/throughthetrees
public
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.

When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```

This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.

Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.

```python
pip install -U datasets
```

All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).

We apologize for the inconvenience.