Skip to content

Conversation

@UranusSeven
Copy link
Contributor

@UranusSeven UranusSeven commented Nov 6, 2025

Purpose

Fix the quant examples. The following import doesn't work anymore.

from llmcompressor.transformers import oneshot

And should be changed to:

from llmcompressor import oneshot

Test Plan

Test the import statement directly.

Test Result

Before this PR:

> python -c "from llmcompressor.transformers import oneshot"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from llmcompressor.transformers import oneshot
ImportError: cannot import name 'oneshot' from 'llmcompressor.transformers' (/root/dev/lib/python3.13/site-packages/llmcompressor/transformers/__init__.py). Did you mean: 'Oneshot'?

After this PR:

python -c "from llmcompressor import oneshot"

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify
Copy link

mergify bot commented Nov 6, 2025

Documentation preview: https://vllm--28188.org.readthedocs.build/en/28188/

@mergify mergify bot added the documentation Improvements or additions to documentation label Nov 6, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the import statement for oneshot in several documentation examples. The change from from llmcompressor.transformers import oneshot to from llmcompressor import oneshot aligns with recent library updates, ensuring that the provided code snippets are accurate and runnable for users. The changes are applied consistently across all relevant files, and I find no issues with this update.

@DarkLight1337
Copy link
Member

cc @mgoin

@DarkLight1337 DarkLight1337 requested a review from mgoin November 6, 2025 06:32
Copy link
Member

@hmellor hmellor left a comment

Choose a reason for hiding this comment

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

oneshot has been added to the top level init https://github.com/vllm-project/llm-compressor/blob/main/src/llmcompressor/__init__.py

@UranusSeven please fix DCO and we can merge

Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
@UranusSeven UranusSeven force-pushed the fix_llmcompressor_doc branch from d7f1c9f to 71af998 Compare November 19, 2025 03:59
@UranusSeven
Copy link
Contributor Author

oneshot has been added to the top level init https://github.com/vllm-project/llm-compressor/blob/main/src/llmcompressor/__init__.py

@UranusSeven please fix DCO and we can merge

Thanks! I've fixed DCO & rebased the PR.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) November 19, 2025 05:29
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 19, 2025
@DarkLight1337 DarkLight1337 merged commit 6a25ea5 into vllm-project:main Nov 19, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in NVIDIA Nov 19, 2025
Victor49152 pushed a commit to Victor49152/vllm that referenced this pull request Nov 20, 2025
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
bhagyashrigai pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Nov 20, 2025
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
Signed-off-by: Bhagyashri <Bhagyashri.Gaikwad2@ibm.com>
LuminolT pushed a commit to LuminolT/vllm that referenced this pull request Nov 21, 2025
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
Signed-off-by: LuminolT <lumischen01@gmail.com>
bigPYJ1151 pushed a commit that referenced this pull request Nov 25, 2025
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
Signed-off-by: jiang1.li <jiang1.li@intel.com>
bringlein pushed a commit to bringlein/vllm that referenced this pull request Nov 26, 2025
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation nvidia ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants