Repository navigation
Fix #103: soft restart with an inactive dependent domain - #105
Merged
MLopez-Ibanez merged 7 commits intoOct 27, 2026
Merged
Conversation
…oft restart with an inactive dependent domain. When a parameter that defines a dependent domain is NA, getDependentBound() returns a single NA, and `x_domain[[2L]]` fails with "subscript out of bounds". The domain is only used when the value is not NA, so compute it only then. * tests/testthat/test-bug-103.R: New. * NEWS.md: Mention the fix.
…odel. (fix MLopez-Ibanez#102) Inside `[.data.table`, a column takes precedence over a local variable of the same name, so a parameter column can shadow the local variables that an expression reads. truncate_rows() subset its argument with `-seq.int(n + 1L, nx)` and now truncates with head() instead. generate_sobol() and sample_from_model() read `param` and `this_model` inside data.table expressions; these now only call closures that are defined before the subset. The random draws do not change. * tests/testthat/test-bug-102.R: New. * NEWS.md: Mention the fix.
…odel. (fix MLopez-Ibanez#102) Inside `[.data.table`, a column takes precedence over a local variable of the same name, so a parameter column can shadow the local variables that an expression reads. truncate_rows() subset its argument with `-seq.int(n + 1L, nx)` and now truncates with head() instead. generate_sobol() and sample_from_model() read `param` and `this_model` inside data.table expressions; these now only call closures that are defined before the subset. The random draws do not change. * tests/testthat/test-bug-102.R: New. * NEWS.md: Mention the fix.
MLopez-Ibanez
force-pushed
the
master
branch
2 times, most recently
from
October 27, 2026 20:31
1a2c707 to
657c076
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #105 +/- ##
=======================================
Coverage 75.48% 75.48%
=======================================
Files 30 30
Lines 5119 5120 +1
=======================================
+ Hits 3864 3865 +1
Misses 1255 1255 🚀 New features to boost your workflow:
|
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.
Fixes #103.
numeric.configurations.equal()computed the domain of each parameter before it looked at the parameter's value. When a parameter that defines a dependent domain is NA,getDependentBound()returns a singleNA, andx_domain[[2L]]fails withsubscript out of bounds. The domain is only used when the value is not NA, so it is now computed only then.tests/testthat/test-bug-103.Radds:similarConfigurations()on two configurations in which the parameter that defines the dependent domain is inactive, once with equal and once with different values of the other parameter;irace()on the space from Soft restart fails when a dependent domain's parameter is inactive #103 for seeds 1 to 10 (seeds 3, 4, 5, 6, 9 and 10 failed before).