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

Updated Trainer's liger-kernel integration to call correct patching API #33502

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

shimizust
Copy link
Contributor

@shimizust shimizust commented Sep 16, 2024

What does this PR do?

Testing

pytest tests/trainer/test_trainer.py::TrainerIntegrationTest::test_use_liger_kernel_patching tests/trainer/test_trainer.py::TrainerIntegrationTest::test_use_liger_kernel_trainer
================================================================================================================================================ test session starts ================================================================================================================================================
platform linux -- Python 3.10.14, pytest-7.4.4, pluggy-1.0.0
rootdir: /home/jobuser/transformers
configfile: pyproject.toml
plugins: xdist-3.6.1, timeout-2.3.1, rich-0.1.1, lipy-config-base-32.0.38, lipy-fabric-35.3.13, lipy-test-8.0.73, datadir-1.3.1
collected 2 items                                                                                                                                                                                                                           

tests/trainer/test_trainer.py ..                                                                                                                                                                                                      [100%]

============================================================================================================= warnings summary ==============================================================================================================
tests/trainer/test_trainer.py::TrainerIntegrationTest::test_use_liger_kernel_trainer
  /home/jobuser/transformers/.venv/lib/python3.10/site-packages/torch/nn/parallel/_functions.py:68: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
    warnings.warn('Was asked to gather along dimension 0, but all '

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================================= 2 passed, 1 warning in 7.34s ========================================================================================================

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?

cc @SunMarc @ArthurZucker

@shimizust shimizust marked this pull request as ready for review September 16, 2024 00:52
@shimizust
Copy link
Contributor Author

cc @ByronHsu @JasonZhu1313

@JasonZhu1313
Copy link
Contributor

LGTM thanks for the great work!

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

LGTM ! Thanks for updating the API !

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 for updating, in time for the next release that will include both

@ArthurZucker ArthurZucker merged commit ba1f1dc into huggingface:main Sep 17, 2024
21 of 23 checks passed
itazap pushed a commit to NielsRogge/transformers that referenced this pull request Sep 20, 2024
…PI (huggingface#33502)

* Updated liger-kernel integration in Trainer to call correct patching API

* Fixed styling
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.

5 participants