Add load_dataset_builder
MEMBER
Hi @mariosasko, thanks for taking on this issue.

Just a few logistic suggestions, as you are one of our most active contributors ❤️ :
- When you start working on an issue, you can self-assign it to you by commenting on the issue page with the keyword: `#self-assign`; we have implemented a GitHub Action to take care of that... 😉 
- When you are still working on your Pull Request, instead of using the `[WIP]` in the PR name, you can instead create a *draft* pull request: use the drop-down (on the right of the *Create Pull Request* button) and select **Create Draft Pull Request**, then click **Draft Pull Request**.

I hope you find these hints useful. 🤗 
2021-06-14T16:43:47Z
https://github.com/huggingface/datasets/pull/2500#issuecomment-860830251
https://api.github.com/repos/huggingface/datasets/issues/2500
MDEyOklzc3VlQ29tbWVudDg2MDgzMDI1MQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/860830251/reactions
2021-06-14T16:44:58Z
https://api.github.com/repos/huggingface/datasets/issues/comments/860830251
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
COLLABORATOR
@albertvillanova Thanks for the tips. When creating this PR, it slipped my mind that this should be a draft. GH has an option to convert already created PRs to draft PRs, but this requires write access for the repo, so maybe you can help.
2021-06-14T17:22:28Z
https://github.com/huggingface/datasets/pull/2500#issuecomment-860856772
https://api.github.com/repos/huggingface/datasets/issues/2500
MDEyOklzc3VlQ29tbWVudDg2MDg1Njc3Mg==
https://api.github.com/repos/huggingface/datasets/issues/comments/860856772/reactions
2021-06-14T17:22:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/860856772
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
COLLABORATOR
Ready for the review!

One additional change. I've modified the `camelcase_to_snakecase`/`snakecase_to_camelcase` conversion functions to fix conversion of the names with 2 or more underscores (e.g. `camelcase_to_snakecase("__DummyDataset__")` would return `___dummy_dataset__`; notice one extra underscore at the beginning). The implementation is based on the [inflection](https://pypi.org/project/inflection/) library.

2021-06-30T16:50:24Z
https://github.com/huggingface/datasets/pull/2500#issuecomment-871569495
https://api.github.com/repos/huggingface/datasets/issues/2500
MDEyOklzc3VlQ29tbWVudDg3MTU2OTQ5NQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/871569495/reactions
2021-06-30T16:50:24Z
https://api.github.com/repos/huggingface/datasets/issues/comments/871569495
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
CONTRIBUTOR
Thank you for adding this feature, @mariosasko - this is really awesome!

Tried with:
```
python -c "from datasets import load_dataset_builder; b = load_dataset_builder('openwebtext-10k'); print(b.cache_dir)"
Using the latest cached version of the module from /home/stas/.cache/huggingface/modules/datasets_modules/datasets
/openwebtext-10k/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b (last modified on Wed May 12 
20:22:53 2021) 

since it couldn't be found locally at openwebtext-10k/openwebtext-10k.py 

or remotely (FileNotFoundError).

/home/stas/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b
```

The logger message (edited by me to add new lines to point the issues out) is a bit confusing to the user - that is what does `FileNotFoundError` refer to? 

1. May be replace  `FileNotFoundError` with where it was looking for a file online. But then the remote file is there - it's found 
2. I'm not sure why it says "since it couldn't be found locally" - as it is locally found at the cache folder and again what does " locally at openwebtext-10k/openwebtext-10k.py" mean - i.e. where does it look for it? Is it `./openwebtext-10k/openwebtext-10k.py` it's looking for? or in some specific dir?

If the cached version always supersedes any other versions perhaps this is what it should say?
```
found cached version at xxx, not looking for a local at yyy, not downloading remote at zzz
```
2021-07-05T17:27:25Z
https://github.com/huggingface/datasets/pull/2500#issuecomment-874250500
https://api.github.com/repos/huggingface/datasets/issues/2500
MDEyOklzc3VlQ29tbWVudDg3NDI1MDUwMA==
https://api.github.com/repos/huggingface/datasets/issues/comments/874250500/reactions
2021-07-05T17:29:00Z
https://api.github.com/repos/huggingface/datasets/issues/comments/874250500
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
MEMBER
Hi ! Thanks for the comments

Regarding your last message:
You must pass `stas/openwebtext-10k` as in `load_dataset` instead of `openwebtext-10k`. Otherwise it doesn't know how to retrieve the builder from the HF Hub.

When you specify a dataset name without a slash, it tries to load a canonical dataset or it looks locally at ./openwebtext-10k/openwebtext-10k.py
Here since `openwebtext-10k` is not a canonical dataset and doesn't exist locally at ./openwebtext-10k/openwebtext-10k.py: it raised a FileNotFoundError.
As a fallback it managed to find the dataset script in your cache and it used this one.
2021-07-06T13:36:31Z
https://github.com/huggingface/datasets/pull/2500#issuecomment-874766804
https://api.github.com/repos/huggingface/datasets/issues/2500
MDEyOklzc3VlQ29tbWVudDg3NDc2NjgwNA==
https://api.github.com/repos/huggingface/datasets/issues/comments/874766804/reactions
2021-07-06T13:36:57Z
https://api.github.com/repos/huggingface/datasets/issues/comments/874766804
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
CONTRIBUTOR
Oh, I see, so I actually used an incorrect input. so it was a user error. Correcting it:

```
python -c "from datasets import load_dataset_builder; b = load_dataset_builder('stas/openwebtext-10k'); print(b.cache_dir)"
/home/stas/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b
```

Now there is no logger message. Got it!

OK, I'm not sure the magical recovery it did in first place is most beneficial in the long run. I'd have rather it failed and said: "incorrect input there is no such dataset as 'openwebtext-10k' at <this path> or <this url>" - because if it doesn't fail I may leave it in the code and it'll fail later when another user tries to use my code and won't have the cache. Does it make sense? Giving me `this url` allows me to go to the datasets hub and realize that the dataset is missing the username qualifier.

> Here since openwebtext-10k is not a canonical dataset and doesn't exist locally at ./openwebtext-10k/openwebtext-10k.py: it raised a FileNotFoundError.

Except it slapped the exception name to ` remotely (FileNotFoundError).` which makes no sense.

Plus for the local it's not clear where is it looking relatively too when it gets `FileNotFoundError` - perhaps it'd help to use absolute path and use it in the message?

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

Finally, the logger format is not set up so the user gets a warning w/o knowing it's a warning. As you can see it's missing the WARNING pre-amble in  https://github.com/huggingface/datasets/pull/2500#issuecomment-874250500

i.e. I had no idea it was warning me of something, I was just trying to make sense of the message that's why I started the discussion and otherwise I'd have completely missed the point of me making an error.
2021-07-06T16:07:31Z
https://github.com/huggingface/datasets/pull/2500#issuecomment-874891223
https://api.github.com/repos/huggingface/datasets/issues/2500
MDEyOklzc3VlQ29tbWVudDg3NDg5MTIyMw==
https://api.github.com/repos/huggingface/datasets/issues/comments/874891223/reactions
2021-07-06T16:08:37Z
https://api.github.com/repos/huggingface/datasets/issues/comments/874891223
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
Adds the `load_dataset_builder` function. The good thing is that we can reuse this function to load the dataset info without downloading the dataset itself.

TODOs:
- [x] Add docstring and entry in the docs
- [x] Add tests

Closes #2484 
