-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathlaunch_tensorboard.bat
32 lines (24 loc) · 995 Bytes
/
launch_tensorboard.bat
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
@echo off
:: Check if the runtime directory exists
if exist runtime (
echo "Runtime directory found. Proceeding with TensorBoard in runtime..."
:: Try to run TensorBoard
echo Attempting to start TensorBoard...
runtime\Scripts\tensorboard.exe --logdir training
:: Check if the previous command failed
if %errorlevel% equ 0 (
echo TensorBoard failed to start, attempting to reinstall TensorBoard...
:: Force uninstall TensorBoard
runtime\python.exe -m pip uninstall -y tensorboard
:: Reinstall TensorBoard
runtime\python.exe -m pip install tensorboard
:: Try running TensorBoard again
runtime\Scripts\tensorboard.exe --logdir training
)
) else (
echo "Runtime directory not found. Activating virtual environment and running TensorBoard..."
:: Activate the virtual environment and run TensorBoard
call venv\Scripts\activate
tensorboard --logdir training
)
pause