Skip to content

Release rouge-score-rs 0.1.1 - #2

Merged
kholdrex merged 1 commit into
mainfrom
release-0.1.1
Oct 11, 2026
Merged

kholdrex merged 1 commit into
mainfrom
release-0.1.1

Conversation

@kholdrex

Copy link
Copy Markdown
Member

Fixes found in a post-release review of 0.1.0.

  • score_batch hang after fork(): Rayon's global pool threads do not survive fork(), so a child forked after the parent used score_batch blocked forever (affects multiprocessing and datasets.map(num_proc=...) on Linux). The binding now records which process owns the pool; forked children score serially. Covered by a test with a timeout.
  • Pickling and copy.deepcopy keep subclass __slots__: the native scorer implements __reduce__, so the Python class no longer needs a custom __getstate__.
  • Changing use_stemmer on the scorer's DefaultTokenizer after construction now takes effect.
  • score_multi and score_batch respect a score method assigned on the instance.
  • tokenize.tokenize decodes bytes returned by a custom stemmer, as rouge-score does.
  • Docs: when score_batch runs in parallel, and what AggregateScore.mid is.
  • CI: a failed punkt_tab download fails the job instead of skipping the split_summaries parity test; the release workflow runs the full CI on the tagged commit before publishing to PyPI; the benchmark downloads the NLTK data it needs.

The Rust crate is unchanged, so only the Python package version moves to 0.1.1.

score_batch shares Rayon's global thread pool, whose threads do not
survive fork(). A child forked after the parent had used score_batch
waited forever, which breaks multiprocessing and datasets.map(num_proc=...)
on Linux. score_batch now remembers which process owns the pool and
scores serially in forked children.

Also from a post-release review: pickling keeps subclass __slots__ (the
native scorer now pickles itself), the cached native scorer follows
changes to the tokenizer's use_stemmer, instance-level score overrides
are respected, tokenize.tokenize accepts bytes from stemmers, docs no
longer overstate when score_batch is parallel, and releases now run the
full test suite on the tagged commit before publishing.
@kholdrex
kholdrex merged commit a960e0e into main Oct 11, 2026
7 checks passed
@kholdrex
kholdrex deleted the release-0.1.1 branch October 11, 2026 01:19
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