Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
_NON_REQUEST_TOP_LEVEL_KEYS = {
# System-level metrics
"throughput",
"lifetime_prefill_token_count",
# Peak memory metrics (added by inference scripts; optionally checked if present in golden values)
"mem-max-allocated-bytes",
}
Expand Down Expand Up @@ -55,6 +56,9 @@ def test_inference_pipeline(
model_config_content = f3.read()

metrics = yaml.safe_load(model_config_content)["METRICS"]
if not metrics:
print("No metrics defined in model_config.yaml, skipping validation.")
return

output_groundtruth = json.loads(golden_values_content)

Expand Down Expand Up @@ -130,6 +134,17 @@ def test_inference_pipeline(
)
output_groundtruth.pop("mem-max-allocated-bytes")

lptc_key = "lifetime_prefill_token_count"
if lptc_key in output_groundtruth and lptc_key not in metrics:
# metrics does not have lifetime_prefill_token_count, so ignore it
output_groundtruth.pop(lptc_key)
elif lptc_key in metrics:
# Ground truth does not have lifetime_prefill_token_count, so ignore it
metrics.pop(lptc_key)
elif lptc_key in output_groundtruth and lptc_key in metrics:
# TODO: Compare liftime_prefill_token_count to groundtruth
pass

for request_id, groundtruth_results in output_groundtruth.items():
current_results = output_current[request_id]

Expand Down
4 changes: 2 additions & 2 deletions tests/functional_tests/shell_test_utils/_run_training.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ else
value=$(echo "$value" | sed 's/^\[//;s/\]$//')
TRAINING_PARAMS_FROM_CONFIG+="$key $value "

# Case: contains spaces
elif [[ "$value" == *" "* ]]; then
# Case: contains spaces or shell metacharacters
elif [[ "$value" == *" "* || "$value" == *"|"* || "$value" == *"("* || "$value" == *")"* ]]; then
TRAINING_PARAMS_FROM_CONFIG+="$key \"$value\" "
# Case: default
else
Expand Down
Loading
Loading