Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] rename skip targets + docs #7863

Merged
merged 7 commits into from
Oct 20, 2020

Conversation

stas00
Copy link
Contributor

@stas00 stas00 commented Oct 17, 2020

As discussed in #6349 this PR brings consistency to skip decorators, so now we will have:

  • require_torch - this test will run only under torch
  • require_torch_gpu - as require_torch plus requires at least 1 GPU
  • require_torch_multigpu - as require_torch plus requires at least 2 GPUs
  • require_torch_non_multigpu - as require_torch plus requires 0 or 1 GPUs
  • require_torch_tpu - as require_torch plus requires at least 1 TPU

Documentation updated and expanded.

The main change was done by running:

find . -type d -name ".git" -prune -o -type f -exec perl -pi -e 's|require_multigpu|require_torch_multigpu|g' {} \;
find . -type d -name ".git" -prune -o -type f -exec perl -pi -e 's|require_torch_and_cuda|require_torch_gpu|g' {} \;
find . -type d -name ".git" -prune -o -type f -exec perl -pi -e 's|require_non_multigpu|require_torch_non_multigpu|g' {} \;

Fixes: #6349

@LysandreJik, @sgugger, @sshleifer

@stas00 stas00 changed the title rename skip targets + docs [testing] rename skip targets + docs Oct 17, 2020
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for doing this! Just added some nits.

docs/source/testing.rst Outdated Show resolved Hide resolved
docs/source/testing.rst Outdated Show resolved Hide resolved
docs/source/testing.rst Outdated Show resolved Hide resolved
@stas00
Copy link
Contributor Author

stas00 commented Oct 19, 2020

I resolved conflicts - it's good to go now.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very welcome change! Thanks @stas00!

@LysandreJik LysandreJik merged commit 3e31e7f into huggingface:master Oct 20, 2020
@stas00 stas00 deleted the skip-decorators branch October 20, 2020 16:18
fabiocapsouza pushed a commit to fabiocapsouza/transformers that referenced this pull request Nov 15, 2020
* rename skip targets + docs

* fix quotes

* style

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <[email protected]>

* small improvements

* fix

Co-authored-by: Sylvain Gugger <[email protected]>
fabiocapsouza added a commit to fabiocapsouza/transformers that referenced this pull request Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[testing] USE_CUDA default and intuitive skip decorators
4 participants