Skip to content

Claude skill for minimize-ad-bug#1314

Draft
penelopeysm wants to merge 3 commits intomainfrom
py/ad
Draft

Claude skill for minimize-ad-bug#1314
penelopeysm wants to merge 3 commits intomainfrom
py/ad

Conversation

@penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Mar 9, 2026

Closes #1313

I haven't actually tried this out yet, but I spent a bit of time iterating on it and dumping (some of) my own knowledge and experience into it. I don't think it's very complete yet. Most likely, I need to take it on a spin a few times, and then iteratively improve it.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Benchmark Report

  • this PR's head: cb3bc37c900ef1bc1e7ac5c2eb59d3be8da19fb8
  • base branch: cca6402b74713f2a43274cc4f918dc7b8267ed2f

Computer Information

Julia Version 1.11.9
Commit 53a02c0720c (2026-02-06 00:27 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

┌───────────────────────┬───────┬─────────────┬────────┬───────────────────────────────┬────────────────────────────┬─────────────────────────────────┐
│                       │       │             │        │       t(eval) / t(ref)        │     t(grad) / t(eval)      │        t(grad) / t(ref)         │
│                       │       │             │        │ ─────────┬──────────┬──────── │ ───────┬─────────┬──────── │ ──────────┬───────────┬──────── │
│                 Model │   Dim │  AD Backend │ Linked │     base │  this PR │ speedup │   base │ this PR │ speedup │      base │   this PR │ speedup │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│               Dynamic │    10 │    mooncake │   true │   284.81 │   278.16 │    1.02 │   7.60 │    7.30 │    1.04 │   2163.37 │   2029.72 │    1.07 │
│                   LDA │    12 │ reversediff │   true │  3278.91 │  2507.07 │    1.31 │   5.02 │    2.72 │    1.85 │  16456.24 │   6811.09 │    2.42 │
│   Loop univariate 10k │ 10000 │    mooncake │   true │ 30184.10 │ 30132.68 │    1.00 │   6.81 │    6.83 │    1.00 │ 205654.28 │ 205682.52 │    1.00 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│    Loop univariate 1k │  1000 │    mooncake │   true │  3061.83 │  4098.76 │    0.75 │   6.63 │    5.03 │    1.32 │  20302.96 │  20635.86 │    0.98 │
│      Multivariate 10k │ 10000 │    mooncake │   true │ 30915.83 │ 43558.09 │    0.71 │   9.88 │    6.64 │    1.49 │ 305487.96 │ 289096.43 │    1.06 │
│       Multivariate 1k │  1000 │    mooncake │   true │  3339.31 │  3750.15 │    0.89 │   9.27 │    8.04 │    1.15 │  30950.27 │  30146.65 │    1.03 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│ Simple assume observe │     1 │ forwarddiff │  false │     0.93 │     0.84 │    1.11 │   9.58 │   11.39 │    0.84 │      8.91 │      9.53 │    0.93 │
│           Smorgasbord │   201 │ forwarddiff │  false │   914.78 │   919.25 │    1.00 │  73.89 │   74.60 │    0.99 │  67593.04 │  68578.13 │    0.99 │
│           Smorgasbord │   201 │      enzyme │   true │  1254.91 │  1252.39 │    1.00 │   4.85 │    4.43 │    1.10 │   6087.64 │   5545.69 │    1.10 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│           Smorgasbord │   201 │ forwarddiff │   true │  1255.39 │  1247.66 │    1.01 │  69.62 │   70.23 │    0.99 │  87397.34 │  87628.56 │    1.00 │
│           Smorgasbord │   201 │    mooncake │   true │  1649.04 │  1689.66 │    0.98 │   4.13 │    3.28 │    1.26 │   6807.90 │   5548.43 │    1.23 │
│           Smorgasbord │   201 │ reversediff │   true │  1242.43 │  1233.62 │    1.01 │ 127.12 │  120.57 │    1.05 │ 157942.45 │ 148735.45 │    1.06 │
├───────────────────────┼───────┼─────────────┼────────┼──────────┼──────────┼─────────┼────────┼─────────┼─────────┼───────────┼───────────┼─────────┤
│              Submodel │     1 │    mooncake │   true │     0.89 │     0.84 │    1.06 │  25.57 │   29.63 │    0.86 │     22.65 │     24.81 │    0.91 │
└───────────────────────┴───────┴─────────────┴────────┴──────────┴──────────┴─────────┴────────┴─────────┴─────────┴───────────┴───────────┴─────────┘

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.63%. Comparing base (cca6402) to head (cb3bc37).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1314   +/-   ##
=======================================
  Coverage   78.63%   78.63%           
=======================================
  Files          49       49           
  Lines        3492     3492           
=======================================
  Hits         2746     2746           
  Misses        746      746           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Write a Claude skill for minimising AD bugs

1 participant