Skip to content

Conversation

@ParagEkbote
Copy link
Contributor

@ParagEkbote ParagEkbote commented Oct 24, 2025

Description

As described in the issue, this PR pins the torchao version to 0.12.0. If we want to support a version higher, we will need to bump the torch version as well. After pinning to this version, the warning does not appear. Could you please review?

cc: @davidberenstein1957

Related Issue

Fixes #411

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes


Note

Pins torchao to version 0.12.0 to avoid the PyTorch ABI warning.

Written by Cursor Bugbot for commit 474202c. This will update automatically on new commits. Configure here.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

This PR has been inactive for 10 days and is now marked as stale.

@github-actions github-actions bot added the stale label Nov 4, 2025
@ParagEkbote
Copy link
Contributor Author

Not stale.

@ParagEkbote
Copy link
Contributor Author

ParagEkbote commented Nov 8, 2025

I've pinned the sphinx version to avoid a conflict with jinja. Currently, the janus test is failing since the version supporting it is not being installed while testing. Can I add a step like pip install --upgrade transformers in the CI?

Secondly, the linting with ty seems to be failing due to updates in the newer version of ty, could we pin this package as well. WDYT?

cc: @davidberenstein1957

@github-actions github-actions bot removed the stale label Nov 9, 2025
@ParagEkbote
Copy link
Contributor Author

Could you please review?

cc: @davidberenstein1957

Copy link
Member

@davidberenstein1957 davidberenstein1957 left a comment

Choose a reason for hiding this comment

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

@ParagEkbote, could you rebase on main_ Also, it seems one of the tests is failing because the Janus architecture is not being recognised? Perhaps we should see if this is caused by wrong transformer versions.

pyproject.toml Outdated
"hqq==0.2.7.post1",
"torchao",
"torchao==0.12.0",
"Sphinx>=4.5,<7.0",

Choose a reason for hiding this comment

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

why are we doing this?

Copy link
Contributor Author

@ParagEkbote ParagEkbote Nov 12, 2025

Choose a reason for hiding this comment

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

We need to pin the sphinx error to prevent a version conflict with jinja. The GH Action logs for the same:https://github.com/PrunaAI/pruna/actions/runs/18781274712/job/53587851292

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Furthermore, I have also pinned the ty version and transformers version, so the test and linting checks are passing. Could you please review?

cc: @davidberenstein1957

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sphinx is only a dev dependency so we shouldn't pin it here. I don't understand why we're pinning it in the first place and the logs are not available anymore (sorry for the delay), could you re-explain / re-run the logs please?

Copy link
Member

@davidberenstein1957 davidberenstein1957 left a comment

Choose a reason for hiding this comment

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

hi @ParagEkbote sorry for the outcome of this PR. I feel that the resctrictions w.r.t. the versioning don't outweigh the benefits of skipping the warning message in this case. WDYT @johannaSommer ?

@ParagEkbote
Copy link
Contributor Author

ParagEkbote commented Nov 13, 2025

hi @ParagEkbote sorry for the outcome of this PR. I feel that the resctrictions w.r.t. the versioning don't outweigh the benefits of skipping the warning message in this case. WDYT @johannaSommer ?

Can we consider updating the torch version so that a newer version of torchao can be used?

cc: @davidberenstein1957

@johannaSommer
Copy link
Member

hi @ParagEkbote sorry for the outcome of this PR. I feel that the resctrictions w.r.t. the versioning don't outweigh the benefits of skipping the warning message in this case. WDYT @johannaSommer ?

Can we consider updating the torch version so that a newer version of torchao can be used?

cc: @davidberenstein1957

Hey @ParagEkbote @davidberenstein1957 thanks for the progress so far! Only catching up now but definitely yes, we can upgrade the torch version and then we should be able to support also newer versions of torchao. Infact @gsprochette is currently working on this torch update, maybe he can give a quick heads up as to when this will be merged.

@gsprochette
Copy link
Collaborator

I think you only see this requirement of transformer>=4.57.3 because gliner resolved to 0.2.24 on your side, but lower versions are compatible with the requirements of pruna. Running uv pip install --dry-run transformers==4.37 pruna to check compatibility resolves, meaning the transformers version can go much lower than you expect.

We should not constraint the transformers version unless the code in pruna is incompatible with these anterior versions, so I'm in favor of not touching the transformers version in this PR.

@ParagEkbote
Copy link
Contributor Author

ParagEkbote commented Dec 4, 2025

I think you only see this requirement of transformer>=4.57.3 because gliner resolved to 0.2.24 on your side, but lower versions are compatible with the requirements of pruna. Running uv pip install --dry-run transformers==4.37 pruna to check compatibility resolves, meaning the transformers version can go much lower than you expect.

We should not constraint the transformers version unless the code in pruna is incompatible with these anterior versions, so I'm in favor of not touching the transformers version in this PR.

Do we need to guard against a future transformers v5 for breaking changes or not touch that as well?

cc: @gsprochette

@gsprochette
Copy link
Collaborator

I don't think it's necessary for now to guard against the future transformers versions, we'll restrict compatibility if necessary when the version comes out

@ParagEkbote ParagEkbote changed the title Pin torchao version to avoid warning of PyTorch ABI, update transformers version and pin some deps Pin torchao==0.12.0 to avoid PyTorch ABI warnings, also pin numpydoc>=1.6.0 and ty==0.0.1a21 for compatibility. Dec 5, 2025
@ParagEkbote
Copy link
Contributor Author

I have unpinned transformers as suggested. Could you please review?

cc: @gsprochette

Copy link
Collaborator

@gsprochette gsprochette left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for your work :) @johannaSommer it would be cool to merge this soon to stabilize the CI

ParagEkbote and others added 2 commits December 9, 2025 22:58
* feat/kid-metric and updated docs

* fixed typo

* fixed linting error

* moving KID logic to enum

* fixing linting error

* fixed another linting error

* fixing linting error
@gsprochette
Copy link
Collaborator

Hello @ParagEkbote . It turns out that #457 requires the version pinning that you do here so your PR should be merged before the uv.lock deleting one. Deleting the uv.lock here seems to create a conflict here and the tests can't run, you can just restore it here and I'll take care of that problem with the other PR :)

PS: pinging @johannaSommer

@ParagEkbote
Copy link
Contributor Author

ParagEkbote commented Dec 12, 2025

Hello @ParagEkbote . It turns out that #457 requires the version pinning that you do here so your PR should be merged before the uv.lock deleting one. Deleting the uv.lock here seems to create a conflict here and the tests can't run, you can just restore it here and I'll take care of that problem with the other PR :)

PS: pinging @johannaSommer

I have added back the uv lock file 👍

cc: @gsprochette

@johannaSommer johannaSommer merged commit 2629405 into PrunaAI:main Dec 15, 2025
3 checks passed
@ParagEkbote ParagEkbote deleted the pin-torchao-version branch December 15, 2025 09:05
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.

[BUG] Pin torchao to avoid warning of PyTorch ABI

5 participants