Activate python environment for FastPCA
start_FastPCA_env(
method = c("conda", "virtualenv"),
envname = "FastPCA",
required = TRUE
)Invisibly returns TRUE if setup is successful, FALSE otherwise.
Using a conda environment can allow for quick testing of new versions of pytorch and tinygrad.
However, it should be used with some caution. For example, if you have already used the 'rtorch' backend
in some other functions, not even necessarily part of this package, using start_FastPCA_env will attach
the conda environment but the modules in the environment won't be available. This is a system level
conflict between something in reticulate and torch (maybe libtorch variables?). Because of this,
it is really only recommended to use the python envronment if wanting to use the absolute latest
version of torch (and in the future tinygrad) to compare performance (accuracy and speed). Otherwise,
the rtorch implementation is likely sufficient.
if (FALSE) { # \dontrun{
#for conda
setup_py_env(method = "conda", envname = "FastPCA",
python_version = "3.9", backend = "all", cuda = FALSE)
start_fpca_env
} # }