Skip to content

Release 0.8.0#122

Merged
dylanuys merged 12 commits into
mainfrom
dev
Jul 13, 2026
Merged

Release 0.8.0#122
dylanuys merged 12 commits into
mainfrom
dev

Conversation

@dylanuys

@dylanuys dylanuys commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Release 0.8.0 (0.7.50.8.0).

A correctness, reproducibility, and maintainability pass over the benchmark. Public API is unchanged — no breaking changes for model submitters or callers.

Correctness (scoring)

  • Single-output models no longer silently mis-scored. process_model_output softmaxed a length-1 logit, which is always 1.0, so every sigmoid (1-output) detector was scored as "always AI-generated." Now applies sigmoid for single-output heads. (#—, 775b934)
  • Model output validated PyTorchInferenceSession.run no longer grabs the first tuple/dict element blindly; it unwraps only unambiguous cases and raises a clear error otherwise, plus a last-dim shape guard against the declared num_classes. (775b934)
  • Inference errors no longer drop an entire dataset (image path). All three modality drivers now share one run_batch_and_record that records per-sample errors on inference failure, so a model can't exclude hard data by crashing. Also de-duplicates the three near-identical drivers. (refactor(benchmarks): unify batch inference/record + fix image dataset-abort #118)
  • pyarrow.ArrowInvalid handlers fixed. except (OSError, pyarrow.ArrowInvalid) raised NameError (only pyarrow.parquet as pq was imported), so corrupt-parquet handling crashed instead of catching. (chore: add ruff + mypy + CI tooling (and fix a pyarrow NameError) #120)

Reproducibility

  • Augmentation is now thread-safe/deterministic. Augmentation seeded the process-global RNG inside parallel prefetch workers, so concurrent threads clobbered each other's seed. Now threads a per-call RandomState/random.Random; outputs are byte-identical to before (aug cache stays valid). Verified 0/24 vs 24/24 non-deterministic under 8 threads. (fix(transforms): thread-local RNG for augmentation determinism #119)
  • Filtered-parquet sampling respects the seed. _download_filtered_sequential shuffled shard order with the unseeded global RNG, making sample selection non-reproducible even with a seed set. (59ec197)

Tooling / maintainability

Notes for reviewers

  • All changes verified green in CI (ruff + mypy advisory).
  • Known pre-existing: 5 test_config_loading failures are stale data-drift assertions (m4a/mov are valid formats; hardcoded dataset counts) — not introduced here; a follow-up will make them robust and add a test job to CI.

Commits: 775b934, #118, 59ec197, #119, #120, #121, version bump.

dylanuys and others added 12 commits July 9, 2026 15:12
…hape

Softmax of a length-1 logit was always 1.0, scoring every sigmoid
detector as always-AI. Also stop guessing the first tuple/dict element
and add a last-dim shape guard that fails loudly on ambiguous outputs.
…-abort on inference error

Image inference errors previously propagated and aborted the whole
dataset, letting a model drop hard samples by crashing. All three
drivers now share run_batch_and_record(), which records per-sample
errors instead.
refactor(benchmarks): unify batch inference/record + fix image dataset-abort
_download_filtered_sequential threaded seed into row sampling but
shuffled shard order with the unseeded global RNG, so sample selection
was non-reproducible even with a seed set.
Augmentation seeded the process-global np.random/random inside parallel
prefetch workers, so concurrent threads clobbered each other's seed and
broke the per-sample determinism the seed promises. Thread a per-call
RandomState/random.Random through the transforms instead. Uses the legacy
RNG algorithm so seeded outputs (and the aug cache) are byte-identical;
verified 0/24 vs 24/24 non-deterministic under 8 threads before/after.
fix(transforms): thread-local RNG for augmentation determinism
Configure ruff (pyflakes/import/statement rules, blocking in CI) and mypy
(advisory), add a dev extra and GitHub Actions workflow. Fix issues surfaced:
a real bug where 'except (OSError, pyarrow.ArrowInvalid)' raised NameError
(pyarrow was never imported, only pyarrow.parquet as pq), plus unused
imports/vars, empty f-strings, and bare excepts.
chore: add ruff + mypy + CI tooling (and fix a pyarrow NameError)
Split the 1889-line dataset/download.py into a download/ package
(constants, fetch, listing, extract, cache_io, core) with __init__
re-exporting the public API so all existing imports keep working.
Pure code-move: all 31 defs preserved, verified via identical def
inventory, full import graph, ruff, and the parquet test.
refactor(download): split the download.py god module into a package
@dylanuys
dylanuys merged commit bbb34f6 into main Jul 13, 2026
4 checks passed
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