Skip to contents

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 to NULL.

python_version

string Python version to use.

remove_first

bool If TRUE removes the environment completely before recreating the environment and installing the packages. If FALSE the packages are installed in the existing environment without any prior changes.

use_conda

bool If TRUE uses 'conda' for package management. If FALSE 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.