

TITLE
push_to_hub on custom tokenizer causing a flood of "deadlock" messages

COMMENTS
0

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
### System Info

```shell
- `transformers` version: 4.18.0
- Platform: Linux-4.15.0-176-generic-x86_64-with-glibc2.31
- Python version: 3.9.10
- Huggingface_hub version: 0.5.1
- PyTorch version (GPU?): 1.11.0 (False)
- Tensorflow version (GPU?): 2.8.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no
```


### Who can help?

@SaulLu @Narsil @n1t0 

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

Reproduction code available here: [slides.ipynb](https://github.com/cakiki/huggingface-intro/blob/11db121d492762362bc5e1637950e2e269571a0d/slides.ipynb) if you scroll down to `🤗 Tokenizers`

**TL;DR:** 

I'm training a custom rust `WordPiece` tokenizer, wrapping that into a `PreTrainedTokenizerFast` and calling `.push_to_hub` on that. The push succeeds but I get the `The current process just got forked, after parallelism has already been used.` message, even when I don't use the tokenizer.

I've tried: 
setting the `TOKENIZERS_PARALLELISM` to false -> all jupyter notebook cells that need the internet hang (including `push_to_hub`)
setting the `TOKENIZERS_PARALLELISM` to true -> only `push_to_hub` hangs.

### Expected behavior

```shell
N/A
```
