Skip to content

Installation

Before installation make sure you have PyTorch installed, since ruPrompts' installer doesn't take your OS and compute platform into account and may install an unsuitable version of PyTorch. Refer to the PyTorch installation page for details.

Installation with pip

Use the following command to install only the library part of ruPrompts:

pip install ruprompts

To also install the ruprompts-train entrypoint, add the corresponding extra:

pip install ruprompts[hydra]

Info

I you're using zsh, modify the command to escape the square brackets:

pip install ruprompts\[hydra\]

Installation from source

Installation from source may be your option if you wish to have direct access to conf/ directory to modify Hydra config, e.g. to add custom tasks, datasets, etc.

In this case clone the repo and install the package in editable mode:

git clone https://github.com/sberbank-ai/ru-prompts
cd ru-prompts
pip install -e .[hydra]

Poetry

Since ruPrompts is built with Poetry, you may prefer to install it in virtual environment:

git clone https://github.com/sberbank-ai/ru-prompts
cd ru-prompts
pip install poetry
poetry install -E hydra

Since the ruprompts-train entrypoint willl also be installed to the virtualenv, it will be accessible with

poetry run ruprompts-train
or
poetry shell
ruprompts-train

Although this option may not be convenient for regular usage, it is preferable for development.