-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to return nan/null from script to mark failure
When running a script if your function fails and you get a nan or null or some sort you can now just pass that along to BOA instead of checking and marking your test as failed BOA will mark it as failed for you.
- Loading branch information
1 parent
e87826f
commit 54d5f4a
Showing
5 changed files
with
54 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
objective: | ||
metrics: | ||
- name: metric | ||
scheduler: | ||
n_trials: 10 | ||
|
||
parameters: | ||
x0: | ||
'bounds': [ 0, 1 ] | ||
'type': 'range' | ||
'value_type': 'float' | ||
|
||
|
||
script_options: | ||
run_model: Rscript run_model.R | ||
exp_name: "r_error_nan" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
library(jsonlite) | ||
args <- commandArgs(trailingOnly=TRUE) | ||
trial_dir <- args[length(args)] | ||
out_data <- list( | ||
metric=NaN | ||
) | ||
json_data <- toJSON(out_data, pretty = TRUE) | ||
write(json_data, file.path(trial_dir, "output.json")) |