Installation
It’s a good idea to always use virtual environments when working with Python packages. Anaconda/Miniconda is a package manager that lets you create virtual environments and manage package installations smoothly.
Follow the instructions given below to install Simple Transformers using with Anaconda (or miniconda, a lighter version of anaconda).
Installation steps
- Install Anaconda or Miniconda Package Manager from here.
- Create a new virtual environment and install packages.
1 2
conda create -n st python pandas tqdm conda activate st
- Using a CUDA capable GPU is recommended.
To install Pytorch with CUDA support:
1
conda install pytorch pytorch-cuda=11.7 -c pytorch -c nvidia
CPU only:
1
conda install pytorch cpuonly -c pytorch
Note: Check the Pytorch website for the latest instructions.
- Install simpletransformers.
pip install simpletransformers
Optional
- Install Weights and Biases (wandb) for experiment tracking and visualizing training in a web browser.
pip install wandb