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

[Flax/JAX] Run jitted tests at every commit #13090

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Aug 11, 2021

What does this PR do?

Thanks to @sgugger's PR to run only tests that are affected by the code change, we can re-enable jitted Flax/JAX tests at every commit in my opinion. A jitted Flax/JAX test takes between 20 seconds and 5 minutes per model (only BigBird takes 5 minutes, the second longest test takes 1min), so a total of around 20 minutes (only when files affected all Flax models are pushed).

If just a single Flax model is changed the tests will take a minute or so, see: https://circle-production-customer-artifacts.s3.amazonaws.com/picard/forks/5bdabdd888af1f000130874a/226201271/6113ef4861c2ff26950fd762-0-build/artifacts/~/transformers/reports/tests_flax_durations.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210811T154534Z&X-Amz-SignedHeaders=host&X-Amz-Expires=60&X-Amz-Credential=AKIAJR3Q6CR467H7Z55A%2F20210811%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=1eae0d3553c5ebf6daac2dfa0db9af4dde96e7fe1630bab6d16e442eb8832cb7

@sgugger I think it's fine to run the jitted Flax/JAX tests now everytime thanks to your PR :-)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

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.

Maybe we could leave the BigBird jit test as slow? 5 minutes is very long.
Agreed for the other ones.

@patrickvonplaten
Copy link
Contributor Author

@sgugger - I'll wait with merging this PR hten until "efficient testing" is rolled out for self-push github action

…into run_jitted_flax_test_at_every_commit
@patrickvonplaten
Copy link
Contributor Author

Efficient tests are rolled out on self-push -> merging the PR

@patrickvonplaten patrickvonplaten merged commit 6900dde into huggingface:master Aug 12, 2021
stancld added a commit to stancld/transformers that referenced this pull request Nov 29, 2021
patil-suraj added a commit that referenced this pull request Nov 30, 2021
* Init Flax implementation for Blenderbot

* Add a majority of stuff except for tests

* make style quality

* Add tests and fix some bugs

* Add tests

* Clean source code and fix some bugs

* Fix copies and docs

* Fix jax device condition for tests

* Fix layer norm in the encoder

* Fix a few typos in the test file

* make fix-copies

* make fix-copies

* fix layer norm

* Fix Flax params dtype (#13090)

* Fix PR reference (#13098)

* make fix-copies

* Update tests/test_modeling_flax_blenderbot.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Albertobegue pushed a commit to Albertobegue/transformers that referenced this pull request Jan 27, 2022
* Init Flax implementation for Blenderbot

* Add a majority of stuff except for tests

* make style quality

* Add tests and fix some bugs

* Add tests

* Clean source code and fix some bugs

* Fix copies and docs

* Fix jax device condition for tests

* Fix layer norm in the encoder

* Fix a few typos in the test file

* make fix-copies

* make fix-copies

* fix layer norm

* Fix Flax params dtype (huggingface#13090)

* Fix PR reference (huggingface#13098)

* make fix-copies

* Update tests/test_modeling_flax_blenderbot.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
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.

None yet

2 participants