Repository navigation
Pin parity to the updated R NNS 14.0, regenerate the R cache in the oracle's environment, and bump to 2.3.0 - #199
Merged
Conversation
The R repository rebuilt NNS_14.0.tar.gz on 13 November (9c8bd21, the same archive through de5d4fe): a speed pass that moved interpreted loops into compiled code (NNS.copula, NNS.part, NNS.dep, classification prediction, integer-degree LPM.VaR/UPM.VaR, NNS.meboot's rho targets, dy.d_ stencils, a pruned neighbour search in multivariate NNS.reg). Every cache shard was regenerated from the new archive under the pinned R 4.5.0. None of the 2,999 cached results changed between the two 14.0 builds. 37 entries differ from the previous cache, and each reproduces identically on the old (7b07a83) and the new build: they had been written by another R installation. Two of them, NNS.diff on x^3 at 2 and on x^4 - 3x at -2, were what test_nns_diff_matches_r had been fitted to, by writing the powers as repeated multiplication. R 4.5.0 evaluates x^n with libm pow, so the test functions now do the same (and R_cpow_n's repeated squaring for the complex step); the port then matches R exactly. Live sweeps at exact equality against the new build, with and without the native extension: all 10,265 cases match in each mode, as do 84 large multivariate predictions and 110 edge cases of the newly compiled paths. The full suite passes cache-only with and without the native extension. sync/nns_source.json records the new commit and archive hash. The three overlays whose R sources were rewritten keep the source they were ported from and record the oracle they were verified against (verified_r_commit); the provenance test checks that instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt
…eproduction inspect-r-api-update.yml regenerated the cache under setup-r's current R release (4.6.2 on 13 November) with OpenBLAS on ubuntu-latest, not under the environment docs/parity.md pins, so its cache moved results by an ulp or more and could not pass the port's exact parity tests (#198). The job now runs on ubuntu-24.04 with CRAN's R 4.5.0 build (4.5.0-3.2404.0, held), the reference BLAS and LAPACK selected, and Ubuntu's Rcpp, RcppParallel and jsonlite, and stops unless R reports exactly that. It regenerates tests/invariants' entries as well as tests/parity's, so cache-only verification does not miss them, and records the source archive's hash in the manifest along with the commit. r14-reproduction.yml was removed from main by the baseline job on #194 because it was not on the protected list. It is restored, pinned to the current oracle (9c8bd21, NNS_14.0.tar.gz sha256 754dad65...), and added to the list so unlabelled pull requests keep it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt
The workflow-baseline job reverted the three workflow files when this pull request opened (27b89cb), before it had the workflow-change-approved label. The label is on now, so this puts them back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The R repository rebuilt
NNS_14.0.tar.gzon 13 November (9c8bd21; the same archive is still committed atde5d4fe). It's a speed pass that moves interpreted R loops into compiled code. On the pinned R 4.5.0 it changes no result, and the port stays bit-identical to R. No package code changes.This PR re-pins the oracle, rebuilds the R cache from it, fixes two workflow problems found along the way, and bumps the package to 2.3.0.
Oracle update (
2d90253)7b07a83) and this one.NNS.diffonx^3at 2 and onx^4 - 3xat −2, were whattest_nns_diff_matches_rhad been fitted to, by writing the powers as repeated multiplication.x^nwith libmpow. The test functions now do the same (and useR_cpow_n's repeated squaring for the complex step), and the port matches R exactly.rtol = atol = 0), with and without the native extension: all 10,265 cases match in each mode. So do two new checks: 84 large multivariateNNS.regpredictions (every distance,n.best, tied coordinates) and 110 edge cases of the newly compiled paths.sync/nns_source.jsonanddocs/parity.mdrecord the new commit and archive hash (754dad65…).central_tendencies.cpp,NNS_dep.cpp,NNS_mreg_predict.cpp). They keep the source they were ported from and record the oracle they were verified against in a newverified_r_commitfield. The provenance test checks that field.Workflow fixes (
9d818e6, re-applied in48e03f7; labelledworkflow-change-approved)inspect-r-api-update.ymlnow regenerates in the oracle's environment. It usedsetup-r's current release (R 4.6.2) with OpenBLAS onubuntu-latest. That is why Regenerate R parity cache for NNS 14.0 #198's cache could not pass the exact parity tests. The job now:ubuntu-24.04;r-base-core/r-base-dev4.5.0-3.2404.0(held), selects the reference BLAS/LAPACK, and uses Ubuntu'sr-cran-rcpp,r-cran-rcppparallelandr-cran-jsonlite;It also regenerates
tests/invariants' entries along withtests/parity's, so cache-only verification doesn't miss them, and records the source archive's hash in the manifest. The install and the environment check were exercised on a machine with that exact setup.r14-reproduction.ymlis restored and protected. The baseline job removed it from main on Bump the version to 2.2.0 #194 because it wasn't on the protected list. It's back, pinned to9c8bd21, and added toworkflow-baseline.yml's list so unlabelled PRs keep it.The baseline job reverted these when the PR opened (
27b89cb).48e03f7puts them back now that the label is on, and the job skipped that push.Version 2.3.0 (
1c400f8)pyproject.toml,nns.__version__, the README's current-version line anduv.lockall move to2.3.0.scripts/check_version_consistency.pyanduv lock --checkpass.Before merging
"Files changed" should show 23 files: the 16 above, the three workflow files and the four version files. If the workflow files are missing, the baseline revert is back in place.
After merging
workflow_dispatch,r_commit9c8bd21a77b377cb49d43fececc662d62b00a94e,r_version14.0,NNS_14.0.tar.gz,NNS_14.0.zip). Its regenerated cache should then match the committed one.🤖 Generated with Claude Code
https://claude.ai/code/session_01Wws6NpuQ72C5sfEYVoVmGt