-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fixing scalings logging test #2042
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
Fixing scalings logging test #2042
Conversation
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. |
@BenjaminBossan this should be ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the test. Just one comment about how to check the version.
tests/test_xlora.py
Outdated
assert torch.isfinite(outputs[: inputs.shape[1] :]).all() | ||
|
||
# TODO: remove the skip when 4.45 is released! | ||
@pytest.mark.skipif(int(transformers.__version__.split(".")[1]) < 45, reason="Requires transformers >= 4.45") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do the version check similar to how we do it here:
Line 1670 in c9f7240
uses_transformers_4_38 = packaging.version.parse(transformers.__version__) >= packaging.version.parse("4.38.0") |
This should be more robust. It requires the import: import packaging.version
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I just added this to the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the test. I checked locally that it's currently skipped and that it would pass with the latest transformers version.
Fix test for latest transformers, skip for earlier versions.
No description provided.