control_py_env {mafR} | R Documentation |
Interface to control variables in a Python environment possibly used by Infusion. Currently the only implemented control is that of the torch random seed.
control_py_env(py_handle, seed = NULL)
py_handle |
An R environment that provides access to a Python evaluation environment,
as produced by |
seed |
Numeric: passed (as integer value) to |
Returns NULL invisibly.
## Initialization of Python session:
my_env <- list2env(list(is_set=FALSE),parent = emptyenv())
py_handle <- get_py_MAF_handle(my_env, reset=FALSE, torch_device="cpu")
if (inherits(py_handle,"environment")) control_py_env(py_handle, seed=0L)