Skip to content

Add vLLM-metax vllm metax model resource plan#310

Open
ghangz wants to merge 2 commits into
MetaX-MACA:masterfrom
ghangz:mengz/vllm-metax-model-resource-plan
Open

Add vLLM-metax vllm metax model resource plan#310
ghangz wants to merge 2 commits into
MetaX-MACA:masterfrom
ghangz:mengz/vllm-metax-model-resource-plan

Conversation

@ghangz

@ghangz ghangz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Adds a focused vllm metax model resource plan improvement for MetaX-MACA/vLLM-metax.
  • The change targets MetaX MACA development and validation workflows, with emphasis on earlier diagnostics, reproducible logs, or safer benchmark tooling.
  • Existing default behavior is kept compatible; the new logic is scoped to explicit checks, helper tools, or validation metadata.

Validation

  • Verified on Gitee.AI MetaX GPU resources: vLLM-metax_vLLM image batch, 10/10 PASS; PyTorch-MACA batch also covered vLLM-metax runtime tools.
  • Branch validation command: python tools/model_resource_plan.py --self-test
  • Pull request text is intentionally ASCII-only to avoid encoding issues on web forms and API clients.

Review notes

  • Source branch: ghangz:mengz/vllm-metax-model-resource-plan
  • Target branch: MetaX-MACA/vLLM-metax:master
  • Maintainers can modify this branch if follow-up adjustments are needed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Python script, tools/model_resource_plan.py, which generates resource-aware validation plans for MACA containers. The feedback highlights an improvement opportunity in the self-test logic, recommending the replacement of the assert statement with an explicit conditional check and a RuntimeError to ensure the validation is not bypassed when Python is executed with optimization flags.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tools/model_resource_plan.py Outdated

def self_test() -> None:
rows = plan(CASES[:1])
assert rows and rows[0]["case"] == CASES[0]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Using assert statements for runtime validation or self-tests is discouraged because assertions can be globally disabled in Python when run with optimization flags (e.g., python -O). If assertions are disabled, this validation check will be completely bypassed. It is safer and more robust to use an explicit conditional check and raise an appropriate exception (such as RuntimeError).

Suggested change
assert rows and rows[0]["case"] == CASES[0]
if not (rows and rows[0]["case"] == CASES[0]):
raise RuntimeError("Self-test validation failed")

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.

1 participant