Skip to content

Clean up affine PZ two-jet notebook diagnostics - #188

Merged
MoritzMaibaum merged 1 commit into
better-intfrom
codex/update-affine_pz_twojet-notebook-for-diagnostics
Jul 24, 2026
Merged

Clean up affine PZ two-jet notebook diagnostics#188
MoritzMaibaum merged 1 commit into
better-intfrom
codex/update-affine_pz_twojet-notebook-for-diagnostics

Conversation

@MoritzMaibaum

Copy link
Copy Markdown
Collaborator

Motivation

  • Remove large, written-out polynomial trace rendering and verbose PZ multiplication/monomial diagnostics so the notebook is easier to read and maintain.
  • Replace the heavy trace and rendered LaTeX output with a compact, informative summary of the final PZ two-jet components placed near the PZ norm bounds.

Description

  • Updated notebooks/affine_pz_twojet_adaquad_benchmarks.ipynb to remove unused rendering imports and diagnostic helpers by deleting from IPython.display import Markdown, display and removing build_pz_twojet_norm_diagnostics, collect_pz_diagnostics, and pz_to_latex from the intervalnets imports.
  • Replaced the opt-in trace path that called model.eval_pz_twojet(..., return_trace=True) and wrote a Markdown trace file with a direct call jet = model.eval_pz_twojet(cell.domain) and removed all TRACE_*, trace rendering helpers, and file I/O.
  • Stopped using the diagnostic collection cell and the multiplication/monomial diagnostics, and instead constructed integrands directly from the final jet with y_sq = pz_sum_squares(jet.Y), j_sq = pz_sum_squares(jet.J), h_sq = pz_sum_squares(jet.H), and set l2_integrand, w12_integrand, and w22_integrand accordingly.
  • Added a compact final diagnostics table using the summarize_final_twojet_component helper and final_twojet_monomial_diagnostics DataFrame showing distinct_monomials, max_degree, noise counts, and shapes for Y, J, and H, placed immediately before the direct PZ norm bounds cell.

Testing

  • Ran automated notebook JSON assertions that validate the forbidden trace/diagnostic symbols (e.g. return_trace, TRACE_, build_pz_twojet_norm_diagnostics, collect_pz_diagnostics, pz_to_latex) are absent and that final_twojet_monomial_diagnostics and the ## Final two-jet monomial diagnostics heading are present, and all assertions passed.
  • Performed a JSON load/format validation of the modified notebook, and the script checks completed successfully.

Codex Task

@MoritzMaibaum
MoritzMaibaum merged commit de8ee05 into better-int Jul 24, 2026
1 check passed
@MoritzMaibaum
MoritzMaibaum deleted the codex/update-affine_pz_twojet-notebook-for-diagnostics branch July 24, 2026 16:37
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.

1 participant