Skip to content

Report shape and dtype changes on excessive retracing - #468

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:issue-176-trace-diagnostics
Open

sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:issue-176-trace-diagnostics

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Improves assert_max_traces diagnostics by recording the array shape/dtype signature of traced arguments. When the trace limit is exceeded, the assertion now reports arguments whose shapes, dtypes, or array structure changed since the previous trace.

The existing guidance remains in the error message, and non-array leaves are ignored. Regression coverage includes both shape and dtype changes.

Fixes #176.

Validation

  • pytest chex/_src/asserts_test.py -k AssertMaxTracesTest -q — 53 passed, 48 skipped
  • git diff --check passed

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.

Better error report for max traces exceeded

1 participant