Update (pip install –upgrade) CISSVAE inside the CISSVAE virtualenv
Source:R/create_venv.R
update_cissvae_env.RdUses the same env discovery rules as create_cissvae_env().
Usage
update_cissvae_env(
envname = "cissvae_environment",
path = NULL,
install_python = FALSE,
python_version = "3.10",
pkgs = "ciss-vae",
upgrade = TRUE,
quiet = FALSE
)Arguments
- envname
Name of the virtual environment (default location).
- path
Optional directory containing the virtualenv.
- install_python
Logical; if TRUE, install Python if none of at least the requested version is found on the system.
- python_version
Python version string (major.minor), used when installing Python.
- pkgs
Character vector of pip packages to upgrade in the env. Defaults to ciss-vae only. Other dependencies of ciss-vae ( "numpy", "pandas", "torch", "rich", "matplotlib", "scikit-learn", "optuna", "typing") can also be upgraded using this function by adding them to the character vector.
- upgrade
Logical; if TRUE pass –upgrade to pip.
- quiet
Logical; reduce output.
Examples
# \donttest{
## Requires a working Python environment via reticulate
## Examples are wrapped in try() to avoid failures on CRAN check systems
try({
update_cissvae_env(
envname = "cissvae_environment",
install_python = FALSE,
python_version = "3.10",
pkgs = "ciss-vae")})# }
#> Error in reticulate::use_virtualenv(env_spec, required = TRUE) :
#> Directory ~/.virtualenvs/cissvae_environment is not a Python virtualenv