
Installing necessary python modules to an environment
Source:R/install_and_config.R
install_py_modules.Rd
Function for installing the necessary python modules.
Usage
install_py_modules(
envname = "aifeducation",
transformer_version = "<=4.52.4",
tokenizers_version = "<=0.21.1",
pandas_version = "<=2.3.0",
datasets_version = "<=3.6.0",
codecarbon_version = "<=3.0.2",
safetensors_version = "<=0.5.3",
torcheval_version = "<=0.0.7",
accelerate_version = "<=1.8.1",
pytorch_cuda_version = "12.6",
python_version = "3.12",
remove_first = FALSE,
use_conda = FALSE
)
Arguments
- envname
string
Name of the environment where the packages should be installed.- transformer_version
string
determining the desired version of the python library 'transformers'.- tokenizers_version
string
determining the desired version of the python library 'tokenizers'.- pandas_version
string
determining the desired version of the python library 'pandas'.- datasets_version
string
determining the desired version of the python library 'datasets'.- codecarbon_version
string
determining the desired version of the python library 'codecarbon'.- safetensors_version
string
determining the desired version of the python library 'safetensors'.- torcheval_version
string
determining the desired version of the python library 'torcheval'.- accelerate_version
string
determining the desired version of the python library 'accelerate'.- pytorch_cuda_version
string
determining the desired version of 'cuda' for 'PyTorch'. To install 'PyTorch' without cuda set toNULL
.- python_version
string
Python version to use.- remove_first
bool
IfTRUE
removes the environment completely before recreating the environment and installing the packages. IfFALSE
the packages are installed in the existing environment without any prior changes.- use_conda
bool
IfTRUE
uses 'conda' for package management. IfFALSE
uses virtual environments for package management.
Value
Returns no values or objects. Function is used for installing the necessary python libraries in a conda environment.
Note
Function tries to identify the type of operating system. In the case that MAC OS is detected 'PyTorch' is installed without support for cuda.
See also
Other Installation and Configuration:
check_aif_py_modules()
,
install_aifeducation()
,
install_aifeducation_studio()
,
prepare_session()
,
set_transformers_logger()
,
update_aifeducation()