Skip to content

Commit

Permalink
a required parameter can not have a default.
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 committed Jan 14, 2024
1 parent 96393b0 commit ab349f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/PipeOpBreslow.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ PipeOpBreslow = R6Class("PipeOpBreslow",

# define `breslow.overwrite` parameter
private$.breslow_ps = ps(
overwrite = p_lgl(default = FALSE, tags = c("predict", "required"))
overwrite = p_lgl(tags = c("predict", "required"))
)
private$.breslow_ps$values = list(overwrite = FALSE)
if ("set_id" %in% names(private$.learner$param_set)) {
Expand Down
6 changes: 3 additions & 3 deletions R/TaskGeneratorSimsurv.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ TaskGeneratorSimsurv = R6Class("TaskGeneratorSimsurv",
initialize = function() {
ps = ps(
dist = p_fct(levels = c("weibull", "exponential", "gompertz"), default = "weibull"),
lambdas = p_dbl(lower = 0, default = 0.1, tags = "required"),
gammas = p_dbl(lower = 0, default = 1.5, tags = "required"),
maxt = p_dbl(lower = 0, default = 5, tags = "required")
lambdas = p_dbl(lower = 0, tags = "required"),
gammas = p_dbl(lower = 0, tags = "required"),
maxt = p_dbl(lower = 0, tags = "required")
)
ps$values = list(lambdas = 0.1, gammas = 1.5, maxt = 5)

Expand Down

0 comments on commit ab349f2

Please sign in to comment.