training fix.add global settings

This commit is contained in:
Philipp
2025-12-02 09:55:50 +01:00
parent c3c7e042bb
commit 0e31237b79
7 changed files with 96 additions and 65 deletions

View File

@@ -152,12 +152,7 @@ def start_yolox_training():
cmd = f'cmd /c ""{venv_activate}" && python tools\\train.py {train_args}"'
else:
# Linux: Use bash with source
# If venv path doesn't end with 'activate', assume it needs bin/activate
if not yolox_venv.endswith('activate'):
venv_activate = os.path.join(yolox_venv, 'bin', 'activate')
else:
venv_activate = yolox_venv
cmd = f'bash -c "source {venv_activate} && python tools/train.py {train_args}"'
cmd = f'bash -c "source {yolox_venv} && python tools/train.py {train_args}"'
print(f'Training command: {cmd}')