Open
Conversation
c7c3e80 to
e72af50
Compare
9ff9e88 to
546ff56
Compare
This was referenced Apr 1, 2026
Draft
e72af50 to
535386d
Compare
535386d to
b8beec1
Compare
b8beec1 to
bd61daf
Compare
bd61daf to
9649742
Compare
e9841d2 to
a94558d
Compare
stack-info: PR: #1910, branch: shunting314/stack/29
a94558d to
868686e
Compare
jansel
requested changes
Apr 8, 2026
Contributor
jansel
left a comment
There was a problem hiding this comment.
I do wonder if we even need the alternate strategy. Where is it used?
Comment on lines
+223
to
+224
| max_abs_diff: float | None = None, | ||
| max_rel_diff: float | None = None, |
Contributor
There was a problem hiding this comment.
How is this different from atol/rtol?
Contributor
Author
There was a problem hiding this comment.
I didn't use these 2 arguments and just copied over from the existing code. @yf225 is there any usage of them?
Comment on lines
+260
to
+265
| mismatched = (abs_diff > atol + rtol * e.abs()).sum().item() | ||
| mismatch_pct = mismatched / total if total > 0 else 0.0 | ||
| if mismatch_pct > max_mismatch_pct: | ||
| raise AssertionError( | ||
| f"Too many mismatches: {mismatch_pct:.4%} > {max_mismatch_pct:.4%}" | ||
| ) |
Contributor
There was a problem hiding this comment.
Isn't it semantically different to do this in a chunked way? You are measuring percentage different on a chunk not on the entire tensor.
Contributor
Author
There was a problem hiding this comment.
Chunk is handled inside _chunked_assert_close. This part of code operates on the entire tensor though
Contributor
Author
Contributor
|
@yf225 can you comment on if we could remove this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PRs:
There are 2 APIs to check accuracy
Consolidate these 2 APIs so we only need maintain one.