-
Notifications
You must be signed in to change notification settings - Fork 404
Improve how we identify and run e2e smoke tests #2336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| scheme: NVFP4 | ||
| num_calibration_samples: 20 | ||
| dataset_id: HuggingFaceH4/ultrachat_200k | ||
| dataset_split: train_sft | ||
| dataset_split: train_sft |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| scheme: FP8_DYNAMIC | ||
| scheme: FP8_DYNAMIC |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| recipe: tests/e2e/vLLM/recipes/INT8/recipe_int8_channel_weight_static_per_tensor_act.yaml | ||
| dataset_id: HuggingFaceH4/ultrachat_200k | ||
| dataset_split: train_sft | ||
| scheme: W8A8_channel_weight_static_per_tensor | ||
| scheme: W8A8_channel_weight_static_per_tensor |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| recipe: tests/e2e/vLLM/recipes/kv_cache/gptq.yaml | ||
| dataset_id: HuggingFaceH4/ultrachat_200k | ||
| dataset_split: train_sft | ||
| scheme: kv_cache_default_gptq_tinyllama | ||
| scheme: kv_cache_default_gptq_tinyllama |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| recipe: tests/e2e/vLLM/recipes/Sparse_2of4/recipe_sparse_2of4_fp8_dynamic.yaml | ||
| scheme: sparse2of4_fp8_dynamic | ||
| dataset_id: HuggingFaceH4/ultrachat_200k | ||
| dataset_split: train_sft | ||
| dataset_split: train_sft |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| recipe: tests/e2e/vLLM/recipes/actorder/recipe_w4a16_actorder_weight.yaml | ||
| dataset_id: openai/gsm8k | ||
| dataset_config: main | ||
| dataset_split: train | ||
| scheme: W4A16_actorder_weight | ||
| save_dir: TinyLlama-1.1B-Chat-v1.0-actorder-weight | ||
| save_dir: TinyLlama-1.1B-Chat-v1.0-actorder-weight |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| cadence: "nightly" | ||
| test_type: "regression" | ||
| test_group: "rhaiis" | ||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| recipe: tests/e2e/vLLM/recipes/WNA16/recipe_w4a16_awq_asym.yaml | ||
| dataset_id: HuggingFaceH4/ultrachat_200k | ||
| dataset_split: train_sft | ||
| scheme: W4A16_weight_asym_awq | ||
| save_dir: TinyLlama-1.1B-Chat-v1.0-w4a16-asym-awq | ||
| gpu_memory_utilization: 0.85 | ||
| gpu_memory_utilization: 0.85 |
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,18 +1,21 @@ | ||||||
| #!/bin/bash | ||||||
|
|
||||||
| usage() { | ||||||
| echo "Usage: $0 -c <config> -t <test> -s <save_dir>" | ||||||
| echo "Usage: $0 -c <config> -t <test> -g <test_group> -s <save_dir>" | ||||||
| exit 1 | ||||||
| } | ||||||
|
|
||||||
| while getopts "c:t:s:" OPT; do | ||||||
| while getopts "c:t:g:s:" OPT; do | ||||||
| case ${OPT} in | ||||||
| c ) | ||||||
| CONFIG="$OPTARG" | ||||||
| ;; | ||||||
| t ) | ||||||
| TEST="$OPTARG" | ||||||
| ;; | ||||||
| g ) | ||||||
| GROUP="$OPTARG" | ||||||
| ;; | ||||||
| s ) | ||||||
| SAVE_DIR="$OPTARG" | ||||||
| ;; | ||||||
|
|
@@ -22,20 +25,26 @@ while getopts "c:t:s:" OPT; do | |||||
| esac | ||||||
| done | ||||||
|
|
||||||
| if [[ -z "$CONFIG" || -z "$TEST" || -z "$SAVE_DIR" ]]; then | ||||||
| echo "Error: -c, -t, and -s are required." | ||||||
| script_path=$(dirname "${BASH_SOURCE[0]}") | ||||||
| if [ -z "$CONFIG" ]; then | ||||||
| CONFIG="${script_path}/configs" | ||||||
| fi | ||||||
|
|
||||||
| if [ -z "$TEST" ]; then | ||||||
| TEST="${script_path}/test_vllm.py" | ||||||
| fi | ||||||
|
|
||||||
| if [ -z "$SAVE_DIR" ]; then | ||||||
| echo "Error: -s save_dir is required for rhaiis testing." | ||||||
| usage | ||||||
| fi | ||||||
|
|
||||||
| script_path=$(dirname "${BASH_SOURCE[0]}") | ||||||
| if [ -d "$CONFIG" ]; then | ||||||
| echo "Config is provided as a folder: $CONFIG" | ||||||
| CONFIGS=`ls "$CONFIG"` | ||||||
| elif [ -f "$CONFIG" ]; then | ||||||
| echo "Config is provided as a file: $CONFIG" | ||||||
| CONFIGS=`cat "$CONFIG"` | ||||||
| if [ ! -z "$GROUP" ]; then | ||||||
| echo "Test group is specified: $GROUP" | ||||||
| fi | ||||||
|
|
||||||
| CONFIGS=`ls "$CONFIG"` | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using A safer and more robust way to iterate over files in a directory is to use a for MODEL_CONFIG in "$CONFIG"/*
do
# ... your logic here ...
doneThis would require refactoring the existing loop structure but would make the script much more reliable. |
||||||
|
|
||||||
| SUCCESS=0 | ||||||
|
|
||||||
| # Parse list of configs and add save_dir | ||||||
|
|
@@ -49,30 +58,35 @@ do | |||||
| save_dir=$(cat $MODEL_CONFIG | grep 'save_dir:' | cut -d' ' -f2) | ||||||
| model=$(cat $MODEL_CONFIG | grep 'model:' | cut -d'/' -f2) | ||||||
| scheme=$(cat $MODEL_CONFIG | grep 'scheme:' | cut -d' ' -f2) | ||||||
| test_group=$(cat $MODEL_CONFIG | grep 'test_group:' | cut -d'"' -f2) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the other script, the variable Also, parsing YAML with
Suggested change
|
||||||
|
|
||||||
| # add or overwrite save_dir for each model | ||||||
| if [[ -z "$save_dir" ]]; then | ||||||
| { cat $MODEL_CONFIG; echo -e "\nsave_dir: $SAVE_DIR/$model-$scheme"; } > $CONFIG_FILE | ||||||
| else | ||||||
| { cat $MODEL_CONFIG | grep -v 'save_dir'; echo "save_dir: $SAVE_DIR/$save_dir"; } > $CONFIG_FILE | ||||||
| fi | ||||||
| # run test if test group is not specified or the config matching the specified test group | ||||||
| if [ -z "$GROUP" ] || [[ "${test_group}" == "$GROUP" ]]; then | ||||||
|
|
||||||
| echo "=== RUNNING MODEL: $CONFIG_FILE ===" | ||||||
| cat $CONFIG_FILE | ||||||
| # add or overwrite save_dir for each model | ||||||
| if [[ -z "$save_dir" ]]; then | ||||||
| { cat $MODEL_CONFIG; echo -e "\nsave_dir: $SAVE_DIR/$model-$scheme"; } > $CONFIG_FILE | ||||||
| else | ||||||
| { cat $MODEL_CONFIG | grep -v 'save_dir'; echo "save_dir: $SAVE_DIR/$save_dir"; } > $CONFIG_FILE | ||||||
| fi | ||||||
|
|
||||||
| LOCAL_SUCCESS=0 | ||||||
| export TEST_DATA_FILE="$CONFIG_FILE" | ||||||
| pytest \ | ||||||
| --capture=tee-sys \ | ||||||
| "$TEST" || LOCAL_SUCCESS=$? | ||||||
| echo "=== RUNNING MODEL: $CONFIG_FILE ===" | ||||||
| cat $CONFIG_FILE | ||||||
|
|
||||||
| if [[ $LOCAL_SUCCESS == 0 ]]; then | ||||||
| echo "=== PASSED MODEL: $CONFIG_FILE ===" | ||||||
| else | ||||||
| echo "=== FAILED MODEL: $CONFIG_FILE ===" | ||||||
| fi | ||||||
| LOCAL_SUCCESS=0 | ||||||
| export TEST_DATA_FILE="$CONFIG_FILE" | ||||||
| pytest \ | ||||||
| --capture=tee-sys \ | ||||||
| "$TEST" || LOCAL_SUCCESS=$? | ||||||
|
|
||||||
| SUCCESS=$((SUCCESS + LOCAL_SUCCESS)) | ||||||
| if [[ $LOCAL_SUCCESS == 0 ]]; then | ||||||
| echo "=== PASSED MODEL: $CONFIG_FILE ===" | ||||||
| else | ||||||
| echo "=== FAILED MODEL: $CONFIG_FILE ===" | ||||||
| fi | ||||||
|
|
||||||
| SUCCESS=$((SUCCESS + LOCAL_SUCCESS)) | ||||||
| fi | ||||||
|
|
||||||
| done | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable
$MODEL_CONFIGis not quoted, which will cause the script to fail if a config filename contains spaces. Also, thecatcommand is unnecessary.While parsing YAML with
grepandcutcan be fragile, a simple fix is to quote the variable and remove thecat. For a more robust solution, consider usingsedorawkto handle different quoting styles or spacing in the YAML file.