Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: sys.exit(1) runs unconditionally due to indentation bug
In setup_env.py (line 107) and utils/e2e_benchmark.py (line 23), the
sys.exit(1) was at the same indentation level as 'try', causing it to
run unconditionally after subprocess completes - even when the command
succeeds. This moves sys.exit(1) inside the except block where it
belongs.

Fixes: #447
  • Loading branch information
SparkLabScout committed Mar 13, 2026
commit 248418967ae8fbe5ed97853d762546c8b1f9f023
2 changes: 1 addition & 1 deletion setup_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def run_command(command, shell=False, log_step=None):
subprocess.run(command, shell=shell, check=True)
except subprocess.CalledProcessError as e:
logging.error(f"Error occurred while running command: {e}")
sys.exit(1)
sys.exit(1)

def prepare_model():
_, arch = system_info()
Expand Down
2 changes: 1 addition & 1 deletion utils/e2e_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def run_command(command, shell=False, log_step=None):
subprocess.run(command, shell=shell, check=True)
except subprocess.CalledProcessError as e:
logging.error(f"Error occurred while running command: {e}")
sys.exit(1)
sys.exit(1)

def run_benchmark():
build_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "build")
Expand Down