ai-benchmark/run.sh
second_constantine f117c7b23c doc: add test generation instructions and update run.sh
Added documentation for test generation through Ollama, including new command-line arguments for `generate_tests.py` and updated `run.sh` script. Also added a new `gen` command to `run.sh` for generating tests via Ollama. This improves usability by providing clear instructions and automation for test generation.
2026-01-17 02:40:38 +03:00

57 lines
1.6 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Получаем имя ядра (Linux Linux, macOS Darwin, FreeBSD FreeBSD …)
OS_NAME=$(uname -s)
init() {
if [[ "$OS_NAME" == "Darwin" ]]; then
python3.13 -m venv z
else
python3 -m venv z
fi
upd
}
upd() {
activate
pip install -r requirements.txt --upgrade
git submodule update --remote --merge
}
clean() {
rm -rf results/*
echo "Отчеты успешно очищены"
}
activate() {
source z/bin/activate
}
echo "_= Project Scripts =_"
if [ -n "$1" ]; then
if [[ "$1" == "init" ]]; then
init
elif [[ "$1" == "upd" ]]; then
upd
elif [[ "$1" == "run" ]]; then
activate
shift
python src/main.py "$@"
elif [[ "$1" == "clean" ]]; then
clean
elif [[ "$1" == "gen" ]]; then
activate
echo "🤖 Генерирую тесты через Ollama..."
python scripts/generate_tests.py --count 1 --category all --model second_constantine/t-lite-it-1.0:7b --ollama-url http://10.0.0.4:11434
echo "✅ Тесты успешно сгенерированы"
fi
else
echo " Аргументом необходимо написать название скрипта (+опционально аргументы скрипта)"
echo "Скрипты:"
echo " * init - инициализация, устанавливает env"
echo " * upd - обновление зависимостей"
echo " * run - запуск бенчмарков"
echo " * clean - очистка отчетов"
echo " * gen - генерация тестов через Ollama"
fi