Skip to content

Drop unused cg_lmax5.json data file#43

Closed
johmathe wants to merge 170 commits into
mainfrom
johmathe/drop-cg-data-dir
Closed

Drop unused cg_lmax5.json data file#43
johmathe wants to merge 170 commits into
mainfrom
johmathe/drop-cg-data-dir

Conversation

@johmathe
Copy link
Copy Markdown
Collaborator

Summary

`src/bispectrum/data/cg_lmax5.json` (1.3 MB) was bundled in the wheel but never read at runtime. `_DATA_PATH` was defined in `_cg.py` and orphaned. Clebsch-Gordan coefficients are computed analytically via the Wigner 3j symbol (Racah formula) and cached to disk under `~/.cache/bispectrum/`.

  • Delete `src/bispectrum/data/{cg_lmax5.json,init.py}`
  • Drop the orphan `_DATA_PATH` line and update the module docstring in `_cg.py`
  • Drop `*.json` from `[tool.hatch.build].include` in `pyproject.toml`

Wheel size drops from ~1.55 MB to ~174 kB.

Test plan

  • CI tests pass (CG / SO3 / import tests verified locally: 172 passed)
  • `uv build` succeeds and the wheel contains no `data/` dir

Made with Cursor

johmathe and others added 30 commits January 17, 2026 20:19
Update general API and add cg coefficients
…ff, not the max value that l can take. Hence, l takes values in range(0, lmax). Need to take this into account when building l1 and l2 with the bsp.
Proposes a clean, mathematically faithful API covering:
- Group{on}Domain naming convention (CnonZn, DnonR2, SO3onS2)
- nn.Module-only interface with raw signal inputs
- float32 throughout
- Selective bispectrum as default
- Public API surface and file structure
- Open questions for team discussion

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Explicitly documents that the shift to raw signal inputs breaks SO3onS2
v0.1.0 interface, explains implications, and justifies why the tradeoff
is worthwhile (consistency, encapsulation, correctness, testability).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replaces inline Unicode math with proper $...$ and $$...$$ LaTeX
syntax throughout the design document.
- SO(3) bispectrum formula: remove \hat accent on \mathcal{F} (caused
  rendering issues with accent stacking on calligraphic letters); also
  use proper indexed CG notation C_{l1,l2}^{(l)} matching the paper
- Q3 heading: fix \text{onS}^2 -> \text{ on }S^2 so the superscript
  attaches to S not to the whole text box
- Migration table: remove incorrect escnn reference (we do not depend
  on escnn; CG data is bundled as cg_lmax5.json)
- Scorecard table covering all group/domain combinations:
  Cn, Dn, O (selective + inversion proven), SO(3)/S², disk, ball,
  compact groups, homogeneous spaces (full bispectrum only, open problems)
- Four mathematical TODOs for future selective versions:
  M1: SO(3) on S² (infinite irreps, BFS doesn't terminate)
  M2: SO(2) on disk (commutative structure, likely tractable)
  M3: SO(3) on ball (same challenge as S² + radial dim)
  M4: Inversion for continuous groups (truncation + stability)
- Replace $C_{l_1,l_2}^{(l)}$ inline (multi-underscore) with simplified prose
- Replace $(\rho_1,\rho_2)$ with $(\rho,\sigma)$ to avoid dual-underscore italic misparse
- Replace $O(|G|^2)$ with $O(\lvert G\rvert^2)$ using proper LaTeX delimiters
- Replace $\|G\|$ in table cell with $\lvert G \rvert$ to avoid table pipe conflict
- Replace $\mathbb{R}_{+}^{*}$ (underscore after brace) with $\mathbb{R}^+$ in table cells and headings
- Rewrite TODO-M1 paragraph: remove multi-subscript inline math, state O(L^3) cleanly
- Move Fourier-Bessel integral from inline to display math in TODO-M2
- Fix TODO-M3 heading notation to match TODO-M2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
johmathe and others added 27 commits April 30, 2026 18:28
…struction

Add spherical reconstruction + update experiments methodology
# Conflicts:
#	paper/paper.pdf
#	paper/paper.tex
Captures completed sMNIST, Organ3D, and PCam runs from the H100
parallel sweep, including the new cost metadata (wall_time_s,
epochs_run, peak GPU memory, gpu_name, git_sha, argv).

Made-with: Cursor
- Eliminate Python for-loop in DnonDn.forward by batching all CG-transformed
  bispectrum computations: precomputed Fplus gather indices, single einsum for
  kron products, batched matmul chain. Speedup: 2.41ms -> 0.55ms (4.4x).
- Add test_coverage_gaps.py with 39 edge-case tests covering _bessel, _cg,
  dn_on_dn, so3_on_s2, octa_on_octa, rotation, and torus_on_torus modules.
- Overall test coverage: 91% -> 96%.

Co-authored-by: Cursor <cursoragent@cursor.com>
…dnondn-and-coverage

Optimize DnonDn forward pass and increase test coverage to 96%
- Use importlib.metadata for __version__
- Pin torch>=2.10 (real ABI floor for torch_harmonics 0.9.0)
- Pin torch-harmonics>=0.9
- Add LICENSE file (MIT)
- Restructure extras: drop [plotting], add [experiments]
  with matplotlib/scipy/torchvision/h5py/medmnist
- Restructure paper/experiments/ -> experiments/
- Apply experiments code edits (organ3d, pcam, spherical_mnist, spherical_mnist_reconstruction)
- Enrich README with Supported Groups, API, and Benchmarks sections
- Delete docs/, DESIGN.md, benchmarks/figures/, benchmarks/inversion_results/,
  benchmarks/paper_benchmarks.{tex,pdf}, .cursorrules, paper/ working files
- Exclude experiments/ from pre-commit hooks (research scripts, not library code)

Preserved on main: LICENSE, RELEASE.md, .github/workflows/publish.yml,
pyproject.toml authors/URLs/version (0.3.5), .github/workflows/tests.yml
codecov slug, README CI badges and clone URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ips2026anonymous

Merge improvements from neurips2026anonymous (sans anonymization)
The JSON of precomputed Clebsch-Gordan coefficients was loaded into
_DATA_PATH in _cg.py but never read. CG values are computed analytically
via the Wigner 3j symbol (Racah formula) at runtime, with on-disk caching
under ~/.cache/bispectrum/.

- Delete src/bispectrum/data/{cg_lmax5.json,__init__.py}
- Drop _DATA_PATH definition in _cg.py
- Update _cg.py module docstring (no precomputed-load support)
- Drop *.json from hatch include glob in pyproject.toml

Wheel size: ~1.55 MB -> ~174 kB.

Co-authored-by: Cursor <cursoragent@cursor.com>
@johmathe johmathe closed this May 12, 2026
@johmathe johmathe deleted the johmathe/drop-cg-data-dir branch May 12, 2026 04:49
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.

2 participants