Skip to content

Commit 850ad1e

Browse files
committed
fix issue
Signed-off-by: YanxuanLiu <[email protected]>
1 parent 23cb11c commit 850ad1e

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

python/benchmark/databricks/benchmark_utils.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (c) 2024, NVIDIA CORPORATION.
1+
#!/bin/bash
2+
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -129,13 +130,13 @@ EOF
129130
duration=0
130131
while [[ $status != "TERMINATED" ]] && [[ $status != "ERROR" ]]; do
131132
echo -n "."
132-
if [[ $TIME_LIMIT != "" ]] && (( $duration > $TIME_LIMIT ))
133+
if [[ $TIME_LIMIT != "" ]] && (( duration > TIME_LIMIT ))
133134
then
134135
echo "\ntime limit of $TIME_LIMIT minutes exceeded, canceling run"
135136
databricks jobs cancel-run $run_id --profile $DB_PROFILE
136137
fi
137138
sleep 10
138-
duration=$(( $duration + 10 ))
139+
duration=$(( duration + 10 ))
139140
get_run_status
140141
done
141142

python/benchmark/databricks/cpu_cluster_spec.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (c) 2024, NVIDIA CORPORATION.
1+
#!/bin/bash
2+
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -15,7 +16,7 @@
1516
# needed for bm script arguments
1617
cat <<EOF
1718
{
18-
"num_workers": $(( $num_cpus / 8)),
19+
"num_workers": $(( num_cpus / 8)),
1920
"cluster_name": "$cluster_name",
2021
"spark_version": "${db_version}.x-cpu-ml-scala2.12",
2122
"spark_conf": {},

python/benchmark/databricks/gpu_cluster_spec.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");

python/benchmark/databricks/gpu_etl_cluster_spec.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# Copyright (c) 2025, NVIDIA CORPORATION.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");

python/run_test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ if [ ${CUDA_VISIBLE_DEVICES} ]; then
5454
fi
5555
GPU_MEM_PARALLEL=`nvidia-smi ${NVIDIA_SMI_ARGS} --query-gpu=memory.free --format=csv,noheader | awk 'NR == 1 { MIN = $1 } { if ($1 < MIN) { MIN = $1 } } END { print int((MIN - 2 * 1024) / ((3 * 1024) + 750)) }'`
5656
CPU_CORES=`nproc`
57-
TMP_PARALLEL=$(( $GPU_MEM_PARALLEL > $CPU_CORES ? $CPU_CORES : $GPU_MEM_PARALLEL ))
58-
TMP_PARALLEL=$(( $TMP_PARALLEL > $MAX_PARALLEL ? $MAX_PARALLEL : $TMP_PARALLEL ))
59-
if (( $TMP_PARALLEL <= 1 )); then
57+
TMP_PARALLEL=$(( GPU_MEM_PARALLEL > CPU_CORES ? CPU_CORES : GPU_MEM_PARALLEL ))
58+
TMP_PARALLEL=$(( TMP_PARALLEL > MAX_PARALLEL ? MAX_PARALLEL : TMP_PARALLEL ))
59+
if (( TMP_PARALLEL <= 1 )); then
6060
TEST_PARALLEL=1
6161
else
6262
TEST_PARALLEL=$TMP_PARALLEL

0 commit comments

Comments
 (0)