Skip to content

Commit

Permalink
Conditionally append --output-bucket (#890)
Browse files Browse the repository at this point in the history
* first commit

* typo
  • Loading branch information
Bslabe123 authored Nov 20, 2024
1 parent f73039d commit 21a905b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ for request_rate in $(echo $REQUEST_RATES | tr ',' ' '); do
num_prompts=$(awk "BEGIN {print int($request_rate * $BENCHMARK_TIME_SECONDS)}")
fi
echo "TOTAL prompts: $num_prompts" # Output: 8
PYTHON_OPTS="$PYTHON_OPTS --save-json-results --output-bucket=$OUTPUT_BUCKET --output-bucket-filepath $OUTPUT_BUCKET_FILEPATH --host=$IP --port=$PORT --dataset=$PROMPT_DATASET_FILE --tokenizer=$TOKENIZER --request-rate=$request_rate --backend=$BACKEND --num-prompts=$num_prompts --max-input-length=$INPUT_LENGTH --max-output-length=$OUTPUT_LENGTH --file-prefix=$FILE_PREFIX --models=$MODELS"
PYTHON_OPTS="$PYTHON_OPTS --save-json-results --output-bucket=$OUTPUT_BUCKET --host=$IP --port=$PORT --dataset=$PROMPT_DATASET_FILE --tokenizer=$TOKENIZER --request-rate=$request_rate --backend=$BACKEND --num-prompts=$num_prompts --max-input-length=$INPUT_LENGTH --max-output-length=$OUTPUT_LENGTH --file-prefix=$FILE_PREFIX --models=$MODELS"
if [[ "$SCRAPE_SERVER_METRICS" = "true" ]]; then
PYTHON_OPTS="$PYTHON_OPTS --scrape-server-metrics"
fi
Expand All @@ -47,6 +47,9 @@ for request_rate in $(echo $REQUEST_RATES | tr ',' ' '); do
if [[ "$STREAM_REQUEST" = "true" ]]; then
PYTHON_OPTS="$PYTHON_OPTS --stream-request"
fi
if [[ "$OUTPUT_BUCKET_FILEPATH" ]]; then
PYTHON_OPTS="$PYTHON_OPTS --output-bucket-filepath $OUTPUT_BUCKET_FILEPATH"
fi
$PYTHON $PYTHON_OPTS > $output_file
cat $output_file
sleep 30 # wait 30 seconds before next run to ensure metrics isolation (metrics pulled every 15s)
Expand Down

0 comments on commit 21a905b

Please sign in to comment.