Skip to content

test(differential): the absence-path ml fit needs fittable counts - #176

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/glmgampoi-test
Oct 16, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
fix/glmgampoi-test

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What this change does

The "nb_glm without glmGamPoi refuses with GlmGamPoiUnavailable" testset now fits the injected-effect dataset (with a TSS offset) for its final assertion — the ml-path fit with the requireNamespace override in place — instead of the minimal 4-sample matrix.

Why

The test asserted all(r.status .== "ok") on [5 6; 7 3; 9 4; 4 8]. MEASURED locally with MASS::glm.nb (R 4.5.3, MASS 7.3-60): that data cannot reach status ok — one taxon's theta runs to its upper bound (status boundary, "the fit is effectively Poisson") and the other's alternating fit produced NaNs (status failed, "the fit did not converge"). The feature branch's CI runs were cancelled before completing, so the first completed run on main (da9754f) was the first to expose it. The dataset "Negative-binomial fit recovers an injected effect" already proves fits; with it, all three taxa fit ok with the override in place (MEASURED locally: statuses ["ok", "ok", "ok"]).

The assertion's intent is unchanged: the override defers to base for every other package, so the default dispersion still fits normally with it in place.

How to run its tests

R_HOME=… julia --project=. test/unit/test_differential.jl — the affected testset is the last one. Needs R and MASS; skips loudly without them.

What it leaves out

No production code changes; the fit machinery is untouched. Local runs without zCompositions show unrelated failures in the "Route" testset (it needs zCompositions); CI has it and that testset passed on da9754f.

Versions tested against

Julia 1.13.1, R 4.5.3 (conda-forge) with MASS 7.3-60.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe vibe@mistral.ai

The glmGamPoi-absence testset asserted all(r.status .== "ok") on a
4-sample matrix of small counts. MEASURED with MASS::glm.nb (R 4.5,
MASS 7.3-60): that data cannot reach status ok -- one taxon's theta
runs to its upper bound (status boundary) and the other's alternating
fit produced NaNs (status failed). The test's CI runs were cancelled
before completing on the feature branch, so the first completed run on
main (da9754f) was the first to expose it. The test now fits the
injected-effect dataset with a TSS offset -- the dataset the
"Negative-binomial fit recovers an injected effect" testset already
proves fits -- keeping the assertion's intent: the requireNamespace
override defers to base, so the default dispersion still fits.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b7c7a52b-9018-4ac6-951c-e0e59217e024
📥 Commits

Reviewing files that changed from the base of the PR and between c0d0a83 and 0c59379.

📒 Files selected for processing: 1
  • test/unit/test_differential.jl
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@hyperpolymath
hyperpolymath merged commit afa4af3 into main Oct 16, 2026
5 of 6 checks passed
@hyperpolymath
hyperpolymath deleted the fix/glmgampoi-test branch October 16, 2026 04:21
@sonarqubecloud

Copy link
Copy Markdown

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