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

Correct @is_flaky test decoration #31480

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

qubvel
Copy link
Member

@qubvel qubvel commented Jun 18, 2024

What does this PR do?

Some tests are marked with @is_flaky decorator without brackets, which leads to always passing the test even if an exception is always raised in the test.

For example:

@is_flaky  # <------ should be @is_flaky()
def test_flash_attn_2_equivalence(self):
    ...

P.S. Fixing this may lead to failing flaky tests, but now these tests are just broken.

Who can review?

@ydshieh

@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.

@qubvel qubvel requested a review from ydshieh June 19, 2024 07:17
Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

Thank you for identifying this!

@ydshieh
Copy link
Collaborator

ydshieh commented Jun 19, 2024

Let's trigger a CI that runs slow tests for a few models involved.

I have put a label run_slow, could you push an empty commit with [run_slow] gemma, xxx, yyy, where xxx, yyy are some model names that you can think of relevant.

@qubvel
Copy link
Member Author

qubvel commented Jun 19, 2024

@ydshieh I triggered slow tests, but it seems like flash attention is not installed in CI (according to pip freeze output) -> tests were skipped:
Screenshot 2024-06-19 at 10 23 11

@ydshieh
Copy link
Collaborator

ydshieh commented Jun 19, 2024

oh, right. Those flash attn tests will only run with .github/workflows/push-important-models.yml which is triggered when a PR being merged to main.

One last thing could try is to use

https://github.com/huggingface/transformers/actions/workflows/ssh-runner.yml

Internal notion doc: https://www.notion.so/huggingface2/SSH-into-our-runners-d9c24de77d0843b2a308f28171106001

It's more a good chance to learn how to use this. Would you like to give it a try even it's somehow manual?

For docker image, you will have to fill huggingface/transformers-all-latest-gpu

You will have to do (once inside the runner)

cd transformers

and

          apt install sudo
          sudo -H pip install --upgrade pip
          sudo -H pip uninstall -y transformers 
          sudo -H pip install -U -e ".[testing]" 
          MAX_JOBS=4 pip install flash-attn --no-build-isolation

@ydshieh
Copy link
Collaborator

ydshieh commented Jun 19, 2024

will merge after an approval from @amyeroberts (as a manual run inside the runner is done .)

@ydshieh ydshieh requested a review from amyeroberts June 19, 2024 14:28
@qubvel
Copy link
Member Author

qubvel commented Jun 19, 2024

Gemma FA2 tests
Screenshot 2024-06-19 at 15 10 25

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for fixing and running tests!

@qubvel qubvel merged commit 3c2d4d6 into huggingface:main Jun 24, 2024
24 of 34 checks passed
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants