Fix CI require beam
NONE
_The documentation is not available anymore as the PR was closed or merged._
2022-10-26T16:55:16Z
https://github.com/huggingface/datasets/pull/5168#issuecomment-1292334822
https://api.github.com/repos/huggingface/datasets/issues/5168
IC_kwDODunzps5NB3bm
https://api.github.com/repos/huggingface/datasets/issues/comments/1292334822/reactions
2022-10-27T09:25:19Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1292334822
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
MEMBER
I'm merging this PR because it is quite a trivial fix and this is required by:
- #5166
2022-10-27T09:23:14Z
https://github.com/huggingface/datasets/pull/5168#issuecomment-1293241475
https://api.github.com/repos/huggingface/datasets/issues/5168
IC_kwDODunzps5NFUyD
https://api.github.com/repos/huggingface/datasets/issues/comments/1293241475/reactions
2022-10-27T09:23:14Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1293241475
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
This PR:
- Fixes the CI `require_beam`: before it was requiring PyTorch instead
  ```python
  def require_beam(test_case):
      if not config.TORCH_AVAILABLE:
          test_case = unittest.skip("test requires PyTorch")(test_case)
      return test_case
  ```
- Fixes a missing `require_beam` in `test_beam_based_builder_download_and_prepare_as_parquet`
- Refactors `require_beam` to use `pytest` (`skipif`) instead