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

Remove unused/duplicated/non-applicable utils from pytorch/utils/helpers #1174

Merged
merged 3 commits into from
Mar 10, 2025

Conversation

kylesayrs
Copy link
Collaborator

@kylesayrs kylesayrs commented Feb 19, 2025

Purpose

  • Remove utils, scoped to mostly src/llmcompressor/pytorch/utils/helpers.py
  • Remove any utils which are related to fine tuning and therefore non-applicable
  • Remove any utils which are duplicated by other utils files
  • Keep any utils that may be worth using in the future

Changes

  • Remove any unused/duplicated/non-applicable from pytorch/utils/helpers
  • Keep any utils that may be worth using in the future
  • Add pytest.mark.unit to helpers unit tests

Testing

  • grep -r "from llmcompressor.pytorch.utils" src/ tests/ examples/
  • Automated test coverage

Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

@kylesayrs kylesayrs marked this pull request as draft February 19, 2025 16:35
Signed-off-by: Kyle Sayers <[email protected]>
@kylesayrs kylesayrs marked this pull request as ready for review February 19, 2025 16:50
@kylesayrs kylesayrs self-assigned this Feb 19, 2025
Copy link
Collaborator

@markurtz markurtz left a comment

Choose a reason for hiding this comment

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

General note, I do worry with how much we are able to remove here and how much means we have restricted functionality, so would like to look through in more detail to designate what may be due to restricted functionality we'll need to add back in the future and what is fully migraged functionality either due to newer framework version or migration to compressed tensors

@kylesayrs
Copy link
Collaborator Author

@markurtz I've kept any utils functions that I saw as might having some use in the future. Even if we remove a function that is used in the future, it can be added back when it's needed.

@dbarbuzzi
Copy link
Collaborator

Add pytest.mark.unit to helpers unit tests

❤️

Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

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

another one

Screenshot 2025-02-27 at 10 54 38 AM

@kylesayrs kylesayrs enabled auto-merge (squash) March 10, 2025 23:31
@kylesayrs kylesayrs merged commit c87ae55 into main Mar 10, 2025
8 checks passed
@kylesayrs kylesayrs deleted the remove-unused-helpers branch March 10, 2025 23:32
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