Proposed syntax:
#| flags-dest: ::FLAGS
FLAGS <- local({
noise <- .2
batch_size <- 32
environment()
})
...
model %>% fit(batch_size = FLAGS$batch_size)
Alternative ways to supply the flags-dest param might include:
#| flags-dest: ::FLAGS
#| flags-dest: .::FLAGS
#| flags-dest: ./train.R::FLAGS
Also, a decision regarding the meaning of 1 vs 2 colons needs to be made. E.g., scripts that implicitly define pipelines may use a single : to refer to a named operation, while two colons :: may be used to refer to R objects. Alternatively, we can use $, or ., if :: is to be reserved for guild created packages.
Proposed syntax:
Alternative ways to supply the
flags-destparam might include:Also, a decision regarding the meaning of 1 vs 2 colons needs to be made. E.g., scripts that implicitly define pipelines may use a single
:to refer to a named operation, while two colons::may be used to refer to R objects. Alternatively, we can use$, or., if::is to be reserved for guild created packages.