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

Fix check_training_gradient_checkpointing #34806

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Nov 19, 2024

What does this PR do?

Currently inour CI runners' environment, there is no pytest-subtests installed. In this case, using subTest with skipTest in it will skip the whole test even if our goal is to just skip that subTest and continue to the next step in the for loop. In check_training_gradient_checkpointing, the first model_class is the base model and it calls skipTest and no other model_class being checked.

However, pytest-subtests has some issues regarding the reporting. A PR is opened pytest-dev/pytest-subtests#169.

In the meantime, let's use continue for now instead of skipTest so we can really test gradient checkpointing.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Thanks 🧼

@ydshieh ydshieh merged commit 469eddb into main Nov 19, 2024
27 checks passed
@ydshieh ydshieh deleted the fix_gradient_ckpt_tests branch November 19, 2024 16:48
vasqu pushed a commit to vasqu/transformers that referenced this pull request Nov 19, 2024
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.

3 participants