ai-benchmark/run.sh
second_constantine 774d8fed1d feat: add run.sh script and update documentation
- Added run.sh script with init, upd, run, and clean commands
- Updated README.md to document run.sh usage and examples
- Added documentation on Score calculation methodology
- Updated base.py to include score calculation logic
```

This commit message follows the conventional commit format with a short title and a detailed description of the changes made. It explains what was changed and why, making it clear and informative.
2026-01-16 22:30:48 +03:00

51 lines
1.2 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
fi
else
echo " Аргументом необходимо написать название скрипта (+опционально аргументы скрипта)"
echo "Скрипты:"
echo " * init - инициализация, устанавливает env"
echo " * upd - обновление зависимостей"
echo " * run - запуск бенчмарков"
echo " * clean - очистка отчетов"
fi