Skip to content

refactor!: remove threads parameters; parallelism always uses all available CPU threads - #142

Merged
SkyeAv merged 1 commit into
mainfrom
remove-threads-param
Sep 8, 2026
Merged

refactor!: remove threads parameters; parallelism always uses all available CPU threads#142
SkyeAv merged 1 commit into
mainfrom
remove-threads-param

Conversation

@SkyeAv

@SkyeAv SkyeAv commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Removes every user-facing thread-count knob. Parallelism is now always automatic, using all available CPU threads.

Removed

  • --threads/-t from tablassert build-kg and tablassert build-fullmap
  • --gepa-threads from the agent command (GEPA now uses its library-default pool)
  • threads/num_threads parameters from the Python API (resolve, resolve_batch, lookup_rows, pipelines, run_gepa, Tcode) and the Rust pyfunctions (build_fullmap_db, lookup_fullmap_terms)

Behavior (previously the threads=None default, now the only path)

  • Fullmap builds: all available CPU threads, memory-capped on Linux (~2 GB of MemAvailable per thread) to avoid OOMs
  • Fullmap lookups: all CPU threads for batches ≥ 1024 terms, serial below that
  • Internal build_fullmap_inner/build_test keep explicit worker counts so serial-vs-parallel determinism tests are preserved

Docs — thread-flag rows removed from docs/cli.md, docs/fullmap.md, docs/api/fullmap.md, docs/agent.md, examples/agent/README.md; each now documents that parallelism is automatic. New Unreleased CHANGELOG entry. The separate TABLASSERT_FULLMAP_PRODUCERS env knob is unchanged.

Verification

  • Python: 1158 passed, 43 skipped
  • Rust: 126 passed
  • ruff, cargo fmt --check, clippy -D warnings, pyright (0 errors) all clean
  • CLI help for all three commands shows no thread flags; --threads is rejected as an unknown option

BREAKING CHANGE: --threads/-t, --gepa-threads, and the threads/num_threads API parameters no longer exist.

…ilable CPU threads

Drop --threads/-t from build-kg and build-fullmap, --gepa-threads from
the agent command, and the threads/num_threads parameters from the
Python API and Rust pyfunctions. Fullmap builds and lookups now always
use the previous automatic default: all available CPU threads, with
builds memory-capped on Linux (~2 GB/thread) and lookups parallelized
for batches of 1024+ terms.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b51e6b04-8597-4d1d-8bd6-e8c3dda2059b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SkyeAv
SkyeAv merged commit 4bd5701 into main Sep 8, 2026
5 checks passed
SkyeAv added a commit that referenced this pull request Sep 8, 2026
Cut 17.0.0 and bump the package version in pyproject.toml, uv.lock, and
CITATION.cff.

Major: the parallelism surface is removed (#142) - the `--threads` / `-t`
flags on `build-kg` and `build-fullmap`, the agent command's
`--gepa-threads` flag, and the `threads` / `num_threads` parameters on
the Python and Rust pyfunctions are gone; migration is to drop those
arguments, since the automatic behavior is exactly the previous default
(all CPU threads, fullmap builds memory-capped on Linux, lookups
parallelized for batches of 1024+ terms) and results are unchanged.
Also shipping: the `uuid_on_collision: merge` fold is near-linear and
the canonical serializer allocation-free (#143) - up to 28.6x on
merge-heavy workloads and 14.6% faster in default `error` mode, with
byte-identical output.

Changelog:
- Versioned the Unreleased section as 17.0.0, renamed its `### Removed`
  subsection to `### Breaking Changes`, gave the threads-removal entry
  its PR link and a migration note, and moved the #143 Performance entry
  out of the already-released 16.6.2 section, where it had been misfiled,
  into 17.0.0.

Docs: docs/cli.md, docs/fullmap.md, docs/api/fullmap.md, docs/agent.md,
and examples/agent/README.md were updated by #142 itself; none needed
here - the release commit touches version metadata and CHANGELOG.md only.

Testing:
- uv run pytest -q -> 1243 passed, 3 skipped (96% coverage)
- uv run ruff check . && uv run ruff format --check . && uv run pyright -> clean / 0 errors
- uv lock --check -> up to date
- uv run mkdocs build --strict -> clean
- cargo fmt --check && cargo clippy --all-targets -- -D warnings -> clean (rust/ touched)
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.

1 participant