-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcorebench.bat
More file actions
85 lines (64 loc) · 1.83 KB
/
corebench.bat
File metadata and controls
85 lines (64 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@echo off
REM ========================
REM CoreBench runner file
REM author: T. de R-R
REM license: Apache-2.0
REM date: 07.01.26
REM ========================
REM ../corebench.bat
REM variables are made local to the script and evaluated at execution time
setlocal ENABLEDELAYEDEXPANSION
REM ensure local dir
pushd "%~dp0"
REM marks
set INFO=[INFO]
set ERROR=[ERROR]
echo %INFO% Initiating setup...
REM Ensure Python 3.14
echo %INFO% Ensuring Python 3.14 is installed...
py -3.14 -c "import sys" >nul 2>&1
REM !=
IF %ERRORLEVEL% NEQ 0 (
echo %INFO% Python 3.14 not detected. Installing, elevation may be required...
winget install -e --id Python.Python.3.14 --source winget --accept-package-agreements --accept-source-agreements
echo %INFO% Verifying Python 3.14 installation...
py -3.14 -c "import sys" >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
echo %ERROR% Failed to install Python 3.14
goto end
)
echo %INFO% Python 3.14 installed successfully.
) ELSE (
echo %INFO% Python 3.14 already installed.
)
echo %INFO% Using Python 3.14
REM Virtual environment
echo %INFO% Activating CoreBench virtual environment...
IF NOT EXIST corebench_env (
py -3.14 -m venv corebench_env
IF %ERRORLEVEL% NEQ 0 (
echo %ERROR% Failed to create virtual environment!
goto end
)
)
call corebench_env\Scripts\activate.bat
echo %INFO% CoreBench virtual environment activated.
REM pip setup
echo %INFO% Cleaning pip cache and installing Python requirements...
py -3.14 -m pip cache purge >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
echo %ERROR% Failed to purge pip cache!
)
py -3.14 -m pip install -r requirements.txt
IF %ERRORLEVEL% NEQ 0 (
echo %ERROR% Failed to install Python dependencies!
)
echo %INFO% Setup complete!
REM Run benchmark
py -3.14 src/corebench.py --m
goto end
:end
echo.
echo Done.
endlocal
pause