Skip to content

Commit 1069544

Browse files
Update benchmarks/auto_tune/batch_auto_tune.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Karan Goel <[email protected]>
1 parent 4e04aa1 commit 1069544

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

benchmarks/auto_tune/batch_auto_tune.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ FAILED_RUNS=()
3333
SCRIPT_START_TIME=$(date +%s)
3434

3535
json_content=$(cat "$INPUT_JSON")
36-
num_runs=$(echo "$json_content" | jq 'length')
36+
if ! num_runs=$(echo "$json_content" | jq 'length'); then
37+
echo "Error: Invalid JSON in $INPUT_JSON. 'jq' failed to get array length." >&2
38+
exit 1
39+
fi
3740

3841
echo "Found $num_runs benchmark configurations in $INPUT_JSON."
3942
echo "Starting benchmark runs..."

0 commit comments

Comments
 (0)