Skip to content

fix: add preferred number of levels option#424

Open
antoneri wants to merge 2 commits intomasterfrom
feat/preferred-number-of-levels
Open

fix: add preferred number of levels option#424
antoneri wants to merge 2 commits intomasterfrom
feat/preferred-number-of-levels

Conversation

@antoneri
Copy link
Copy Markdown
Member

@antoneri antoneri commented Apr 9, 2026

Summary

  • add --preferred-number-of-levels N as a soft hierarchy-depth preference for the CLI and public wrappers
  • reject the invalid combination with --two-level
  • select the best discovered hierarchy by combining hierarchical codelength with the requested level distance without changing the optimization objective

Details

  • expose the new option in C++, Python, and JS
  • keep behavior unchanged when the option is not used
  • regenerate tracked Python SWIG outputs and JS parameter metadata
  • add native, Python, and JS coverage for parsing, wrapper serialization, and hierarchy selection

Verification

  • make build-native OPENMP=0
  • make test-native OPENMP=0
  • make build-python-swig OPENMP=0
  • make build-python OPENMP=0 (in a local venv)
  • make test-python OPENMP=0 (in a local venv)
  • make test-python-swig-freshness OPENMP=0 (in a local venv)
  • npm ci
  • make build-js-metadata OPENMP=0
  • make test-js-metadata OPENMP=0
  • make test-js OPENMP=0

Closes #308

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.

Feature: preferred number of levels

1 participant