-
Notifications
You must be signed in to change notification settings - Fork 197
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
ensure initial propmpt is long for perf metrics tests #1471
base: master
Are you sure you want to change the base?
ensure initial propmpt is long for perf metrics tests #1471
Conversation
@@ -586,7 +586,8 @@ def run_perf_metrics_collection(model_descr, generation_config: Dict, prompt: st | |||
def test_perf_metrics(model_descr, generation_config, prompt): | |||
import time | |||
start_time = time.perf_counter() | |||
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt) | |||
# To ensure the prefill stage takes much more time make initial prompt long. | |||
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt * 200) | |||
total_time = (time.perf_counter() - start_time) * 1000 |
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.
in general, assumptions about perf metrics like assert load_time < 1000.0
should not be in tests, because depending on machine / network stability load_time
may significantly vary
fixed it here #1478 (comment)
@@ -586,7 +586,8 @@ def run_perf_metrics_collection(model_descr, generation_config: Dict, prompt: st | |||
def test_perf_metrics(model_descr, generation_config, prompt): | |||
import time | |||
start_time = time.perf_counter() | |||
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt) | |||
# To ensure the prefill stage takes much more time make initial prompt long. | |||
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt * 200) |
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.
I suppose it's more clear to extend prompt where it's initially created:
(dict(max_new_tokens=20), 'table is made of' * 200),
Fix test from #1414
Ticket CVS-155098