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

Fix provenance of kwargs #2964

Merged
merged 1 commit into from
Nov 11, 2021
Merged

Fix provenance of kwargs #2964

merged 1 commit into from
Nov 11, 2021

Conversation

fritzo
Copy link
Member

@fritzo fritzo commented Nov 9, 2021

This extends ProvenanceTensor to handle kwargs, which is needed in PyTorch 1.10 because torch.nn.functional.linear's bias input is passed as a named kwarg rather than a positional arg. To clarify the code I've also refactored to use singledispatch with two new functions track_provenance() and extract_provenance().

Tested

  • refactoring is covered by existing tests (test_inspect.py, test_autoguide.py, test_gaussian.py)
  • tested locally with PyTorch 1.10

cc @ordabayevy

@fritzo fritzo requested a review from eb8680 November 9, 2021 14:16
@fritzo fritzo added this to the 1.8 release milestone Nov 10, 2021
@fritzo fritzo mentioned this pull request Nov 10, 2021
6 tasks
@eb8680 eb8680 merged commit 07193b8 into dev Nov 11, 2021
@eb8680 eb8680 deleted the fix-provenance branch November 11, 2021 16:53
@fritzo
Copy link
Member Author

fritzo commented Nov 11, 2021

Thanks for reviewing @eb8680!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants