Skip to content
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

[CI/CD] fix: test metric tag setting #13717

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

llsj14
Copy link
Contributor

@llsj14 llsj14 commented Feb 23, 2025

#13716
There are some test failures in test_metrics.py. This PR aims to fix these errors.

[2025-02-23T04:29:50Z] =========================== short test summary info ============================
--
  | [2025-02-23T04:29:50Z] FAILED metrics/test_metrics.py::test_metric_set_tag_model_name[None-float-distilbert/distilgpt2] - AssertionError: Metrics tag model_name is wrong! expect: 'distilbert/distilgpt2'
  | [2025-02-23T04:29:50Z]   actual: 'distilbert/distilgpt2'
  | [2025-02-23T04:29:50Z] assert 'distilbert/distilgpt2' == 's3://vllm-ci...rt/distilgpt2'
  | [2025-02-23T04:29:50Z]
  | [2025-02-23T04:29:50Z]   - s3://vllm-ci-model-weights/distilbert/distilgpt2
  | [2025-02-23T04:29:50Z]   + distilbert/distilgpt2
  | [2025-02-23T04:29:50Z] FAILED metrics/test_metrics.py::test_metric_set_tag_model_name[served_model_name1-float-distilbert/distilgpt2] - AssertionError: Metrics tag model_name is wrong! expect: 'distilbert/distilgpt2'
  | [2025-02-23T04:29:50Z]   actual: 'distilbert/distilgpt2'
  | [2025-02-23T04:29:50Z] assert 'distilbert/distilgpt2' == 's3://vllm-ci...rt/distilgpt2'
  | [2025-02-23T04:29:50Z]
  | [2025-02-23T04:29:50Z]   - s3://vllm-ci-model-weights/distilbert/distilgpt2
  | [2025-02-23T04:29:50Z]   + distilbert/distilgpt2
  | [2025-02-23T04:29:50Z] FAILED metrics/test_metrics.py::test_engine_log_metrics_regression[False-4-half-distilbert/distilgpt2] - AssertionError: Metrics should be collected
  | [2025-02-23T04:29:50Z] assert None == 8
  | [2025-02-23T04:29:50Z] =================== 3 failed, 17 passed in 527.27s (0:08:47) ===================

Signed-off-by: Sungjae Lee <33976427+llsj14@users.noreply.github.com>
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@llsj14
Copy link
Contributor Author

llsj14 commented Feb 23, 2025

@khluu @DarkLight1337 Could you check this PR please?
I'm having some troubles in my PR related to test_metrics.py.

@DarkLight1337 DarkLight1337 requested a review from khluu February 23, 2025 08:12
@khluu
Copy link
Collaborator

khluu commented Feb 23, 2025

where do you see the failures? This test passed on latest commit on main https://buildkite.com/vllm/ci/builds/14022#0195312e-1004-462a-984a-954af4465df4

@llsj14
Copy link
Contributor Author

llsj14 commented Feb 23, 2025

Copy link
Contributor Author

@llsj14 llsj14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this change, one test failure was resolved, but there are still test failures, so I'm investigating.
This is also an issue I encountered in the previous PR.

[2025-02-23T06:05:14Z] metrics/test_metrics.py:219:
--
  | [2025-02-23T06:05:14Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  | [2025-02-23T06:05:14Z]
  | [2025-02-23T06:05:14Z] model = 's3://vllm-ci-model-weights/distilbert/distilgpt2'
  | [2025-02-23T06:05:14Z] engine = <vllm.engine.llm_engine.LLMEngine object at 0x7fa8f1f259d0>
  | [2025-02-23T06:05:14Z] disable_log_stats = False, num_requests = 8
  | [2025-02-23T06:05:14Z]
  | [2025-02-23T06:05:14Z]     def assert_metrics(model: str, engine: LLMEngine, disable_log_stats: bool,
  | [2025-02-23T06:05:14Z]                        num_requests: int) -> None:
  | [2025-02-23T06:05:14Z]         if disable_log_stats:
  | [2025-02-23T06:05:14Z]             with pytest.raises(AttributeError):
  | [2025-02-23T06:05:14Z]                 _ = engine.stat_loggers
  | [2025-02-23T06:05:14Z]         else:
  | [2025-02-23T06:05:14Z]             assert (engine.stat_loggers
  | [2025-02-23T06:05:14Z]                     is not None), "engine.stat_loggers should be set"
  | [2025-02-23T06:05:14Z]             # Ensure the count bucket of request-level histogram metrics matches
  | [2025-02-23T06:05:14Z]             # the number of requests as a simple sanity check to ensure metrics are
  | [2025-02-23T06:05:14Z]             # generated
  | [2025-02-23T06:05:14Z]             labels = {'model_name': model}
  | [2025-02-23T06:05:14Z]             request_histogram_metrics = [
  | [2025-02-23T06:05:14Z]                 "vllm:e2e_request_latency_seconds",
  | [2025-02-23T06:05:14Z]                 "vllm:request_prompt_tokens",
  | [2025-02-23T06:05:14Z]                 "vllm:request_generation_tokens",
  | [2025-02-23T06:05:14Z]                 "vllm:request_params_n",
  | [2025-02-23T06:05:14Z]                 "vllm:request_params_max_tokens",
  | [2025-02-23T06:05:14Z]             ]
  | [2025-02-23T06:05:14Z]             for metric_name in request_histogram_metrics:
  | [2025-02-23T06:05:14Z]                 metric_value = REGISTRY.get_sample_value(f"{metric_name}_count",
  | [2025-02-23T06:05:14Z]                                                          labels)
  | [2025-02-23T06:05:14Z] >               assert (
  | [2025-02-23T06:05:14Z]                     metric_value == num_requests), "Metrics should be collected"
  | [2025-02-23T06:05:14Z] E               AssertionError: Metrics should be collected
  | [2025-02-23T06:05:14Z] E               assert None == 8
  | [2025-02-23T06:05:14Z]
  | [2025-02-23T06:05:14Z] metrics/test_metrics.py:384: AssertionError
  | [2025-02-23T06:05:14Z] =========================== short test summary info ============================
  | [2025-02-23T06:05:14Z] FAILED metrics/test_metrics.py::test_engine_log_metrics_regression[False-4-half-distilbert/distilgpt2] - AssertionError: Metrics should be collected
  | [2025-02-23T06:05:14Z] assert None == 8


@khluu
Copy link
Collaborator

khluu commented Feb 23, 2025

After this change, one test failure was resolved, but there are still test failures, so I'm investigating. This is also an issue I encountered in the previous PR.

Yea can you merge that PR with main? The fix for that test was merged to main a few hours ago

@llsj14
Copy link
Contributor Author

llsj14 commented Feb 23, 2025

Yeah, I merged the latest commit from #13278.

@llsj14
Copy link
Contributor Author

llsj14 commented Feb 23, 2025

I still have some failures while running test_engine_log_metrics_regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants