Repository navigation
fix: added aci_range() warning about non-default settings when keep = "none" (0.2.1) - #29
Conversation
… "none" (0.2.1) When aci() is run with stepper = "implicit" or nsub > 1 the range comes from a separate explicit single-step run and not from the settings being asked for. A warning already existed for this with keep = "paths" or keep = "table" so this fix just gives one to keep = "none" too, which would skip the warning check by not saving the paths, and the user was not told if the range and the ACI values came from different settings. stepper and nsub are now stored in meta to allow the same aci_warn_stepper warning to be generated from aci_range(). No numerical results change anywhere in the package. If anyone used these specific settings with keep = "none" in acir 0.2.0 or earlier they will just have to re-run aci() and aci_range() with 0.2.1 to get the warning, as those results did not save their settings. Bumped the version 0.2.0.9000 -> 0.2.1 along with including other normal things in this commit (tests, documentation, NEWS entry, etc.).
|
Pushed a fix for the test-28 failure, which is also failing on main. It proposes requiring only differences of under 1e-12 instead of an exact match. All checks passed. |
max578
left a comment
There was a problem hiding this comment.
Hi Aidan,
Thanks for this, and sorry for the delay. Two things before I can approve.
-
keep = "table" still loses the warning. In aci_range.aci_result (acir/R/aci-core.R:1076) the early return for a retained table runs before the meta check, so a saved table result never warns. On a679cbb with aci_dyad_model(), keep = "table" and nsub = 4, aci() warns once. After saveRDS/readRDS, aci_range() gives no warning, although meta$nsub is 4 and the ACI series is up to 0.101 away from the explicit stepper. PACKAGE-SPEC 3.1 says every retention mode warns once per aci_range() call. Could you move the meta check above the early return and add a test that expects exactly one warning on that path?
-
The test-28 tolerance. It is probably round-off, but on my macOS run the gap is exactly 0 on all five series, so the 1e-12 bound is not backed by a measured number yet. Could you post the largest gap per series from one of the Ubuntu jobs here, and add expect_identical(lengths(a), lengths(b)) so the loop cannot pass on missing or mismatched series?
Smaller, not blocking. vignette-2-advanced.Rmd:831 says "bit for bit" and dev/acir-process-rationale.md:1707 says "bit-identical", and neither holds on every platform after this change. The aci_range() help says the range values are the same on every route, but the test grid only covers the scalar dyad, so one matrix-observation case would back that sentence.
Best wishes,
Max
Warn on each aci_range() call when the original aci() run used non-default integration settings, including after saving and reloading. Add matrix-observation tests, strengthen conditional-comparison checks, and add CI diagnostics. Clarify numerical agreement in the documentation.
|
Thanks Max. The largest absolute difference in the original Ubuntu failure log was 1.554e-15 (ACI), which is well below the retained 1e-12 limit (I chose it out of an abundance of caution, and since it is in line with an earlier tolerance choice, but I'm open to changing it). I've included in 9452e12 the warning fix, stronger tests and documentation corrections as requested. Let me know if anything else needs to change. Cheers |
When aci() is run with stepper = "implicit" or nsub > 1 the range comes from a separate explicit single-step run and not from the settings being asked for.
A warning already existed for this with keep = "paths" or keep = "table" so this fix just gives one to keep = "none" too, which would skip the warning check by not saving the paths, and the user was not told if the range and the ACI values came from different settings. stepper and nsub are now stored in meta to allow the same aci_warn_stepper warning to be generated from aci_range(). No numerical results change anywhere in the package.
If anyone used these specific settings with keep = "none" in acir 0.2.0 or earlier they will just have to re-run aci() and aci_range() with 0.2.1 to get the warning, as those results did not save their settings. Bumped the version 0.2.0.9000 -> 0.2.1 along with including other normal things in this commit (tests, documentation, NEWS entry, etc.).