-
Notifications
You must be signed in to change notification settings - Fork 22
Write a comparator for PyTorch #49
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
this looks good, torch.allclose will throw exceptions for all the edge cases (except |
| return False | ||
| if orig.device != new.device: | ||
| return False | ||
| return torch.allclose(orig, new, equal_nan=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
torch.allclose with default params doesn't work as expected for tensors with low magnitude - might want to default to just using rtol?
@misrasaurabh1 try running this. here's the output |
PR Type
Description
Add torch dependency check and flag.
Implement torch.Tensor equality verification.
Include comprehensive torch tensor tests.
Changes walkthrough 📝
comparator.py
Integrate torch.Tensor comparisons.codeflash/verification/comparator.py
test_comparator.py
Add torch tensor comparison tests.tests/test_comparator.py