You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v1.1.0).
Installation
Before you start, you’ll need to setup your environment and install the appropriate packages. 🤗 SetFit is tested on Python 3.8+.
pip
The most straightforward way to install 🤗 SetFit is with pip:
pip install setfit
If you have a CUDA-capable graphics card, then it is recommended to install torch
with CUDA support to train and performing inference much more quickly:
pip install torch --index-url https://download.pytorch.org/whl/cu118
Installing from source
Building 🤗 SetFit from source lets you make changes to the code base. To install from the source, clone the repository and install 🤗 SetFit in editable mode with the following commands:
git clone https://github.com/huggingface/setfit.git
cd setfit
pip install -e .
If you just want the bleeding-edge version without making any changes of your own, then install from source by running:
pip install git+https://github.com/huggingface/setfit.git
Conda
If conda is your package management system of choice, then you can install 🤗 SetFit like so:
conda install -c conda-forge setfit