Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing back nan in language agnostic version as a failed trial #151

Closed
madeline-scyphers opened this issue Sep 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@madeline-scyphers
Copy link
Owner

When constructing output.json, if your metric(s) = nan, then one or more metric failed to return a result, which could be a way to make writing an output.json with a failed trial even simpler. Instead of having to write something like:

res <- hartman6(X)
if (!is.na(res)) {
    out_data <- list(metric=res)
} else {
    out_data <- list(trial_status=unbox("FAILED"))
}
write(toJSON(list(metric=res)), file.path(trial_dir, "output.json"))

you could simplify it to this:

write(toJSON(list(metric=hartman6(unlist(data)))), file.path(trial_dir, "output.json"))

or something like that.

@madeline-scyphers madeline-scyphers added the enhancement New feature or request label Sep 2, 2023
@madeline-scyphers
Copy link
Owner Author

Added in #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant