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

Update _custom_ops.py to accomodate renaming of impl_abstract #124410

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Apr 18, 2024

Fixes a deprecation warning raised because of #123937 and not fixed in #123938

cc @zou3519

Copy link

pytorch-bot bot commented Apr 18, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/124410

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (3 Unrelated Failures)

As of commit 332b776 with merge base 7a6edb0 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@vmoens vmoens changed the title Update _custom_ops.py Update _custom_ops.py to accomodate renaming of impl_abstract Apr 18, 2024
@@ -250,7 +250,7 @@ def impl_abstract(qualname, *, func=None):
"""
import torch.library

return torch.library.impl_abstract(qualname, func, _stacklevel=2)
return torch.library.register_fake(qualname, func, _stacklevel=2)
Copy link
Contributor

Choose a reason for hiding this comment

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

The deprecation is intentional: we shouldn't be using anything in torch._custom_ops anymore.

@zou3519
Copy link
Contributor

zou3519 commented Apr 18, 2024

@vmoens how did you run into this?

@vmoens
Copy link
Contributor Author

vmoens commented Apr 18, 2024

A test in torchrl during vmap execution using nightlies.

We capture the warnings as errors and this one wasn't expected.

There's another one too that appeared recently if you're interested
https://github.com/pytorch/rl/actions/runs/8741799575/job/23988645897?pr=2088#step:11:103566

Both errors come from the fact that vmap imports internally a bunch at execution time. We had a similar error a couple of weeks ago and @jbschlosser helped solving it

I hope the patch makes sense!

Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants