Unverified Commit 651569ff authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

feat: add --no-framework-check option to sanity_check (#5065)


Signed-off-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
Co-authored-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
parent c5760f6a
...@@ -102,6 +102,7 @@ Options: ...@@ -102,6 +102,7 @@ Options:
--runtime-check Skip compile-time dependency checks (Rust, Cargo, Maturin) for runtime containers --runtime-check Skip compile-time dependency checks (Rust, Cargo, Maturin) for runtime containers
and validate ai-dynamo packages (ai-dynamo-runtime and ai-dynamo) and validate ai-dynamo packages (ai-dynamo-runtime and ai-dynamo)
--no-gpu-check Skip GPU detection and information collection (useful for environments without GPU access) --no-gpu-check Skip GPU detection and information collection (useful for environments without GPU access)
--no-framework-check Skip LLM framework package checks (vllm, sglang, tensorrt_llm)
""" """
import datetime import datetime
...@@ -353,11 +354,13 @@ class SystemInfo(NodeInfo): ...@@ -353,11 +354,13 @@ class SystemInfo(NodeInfo):
terse: bool = False, terse: bool = False,
runtime_check: bool = False, runtime_check: bool = False,
no_gpu_check: bool = False, no_gpu_check: bool = False,
no_framework_check: bool = False,
): ):
self.thorough_check = thorough_check self.thorough_check = thorough_check
self.terse = terse self.terse = terse
self.runtime_check = runtime_check self.runtime_check = runtime_check
self.no_gpu_check = no_gpu_check self.no_gpu_check = no_gpu_check
self.no_framework_check = no_framework_check
if hostname is None: if hostname is None:
hostname = platform.node() hostname = platform.node()
...@@ -421,7 +424,7 @@ class SystemInfo(NodeInfo): ...@@ -421,7 +424,7 @@ class SystemInfo(NodeInfo):
self.add_child(gpu_info) self.add_child(gpu_info)
# Add Framework info (vllm, sglang, tensorrt_llm) # Add Framework info (vllm, sglang, tensorrt_llm)
self.add_child(FrameworkInfo()) self.add_child(FrameworkInfo(no_framework_check=self.no_framework_check))
# In terse mode, only add other components if they have errors # In terse mode, only add other components if they have errors
if not self.terse: if not self.terse:
...@@ -2091,9 +2094,16 @@ class PythonInfo(NodeInfo): ...@@ -2091,9 +2094,16 @@ class PythonInfo(NodeInfo):
class FrameworkInfo(NodeInfo): class FrameworkInfo(NodeInfo):
"""LLM Framework information""" """LLM Framework information"""
def __init__(self): def __init__(self, no_framework_check: bool = False):
super().__init__(label="🤖Framework", status=NodeStatus.INFO) super().__init__(label="🤖Framework", status=NodeStatus.INFO)
if no_framework_check:
# Why: In some environments (CI, minimal runtime containers) we may want to
# validate the Dynamo install without requiring a framework/engine package
# (vllm/sglang/tensorrt_llm) to be present.
self.desc = "skipped (--no-framework-check)"
return
# Check for framework packages (mandatory to show) # Check for framework packages (mandatory to show)
frameworks_to_check = [ frameworks_to_check = [
("vllm", "vLLM"), ("vllm", "vLLM"),
...@@ -2990,6 +3000,12 @@ def main(): ...@@ -2990,6 +3000,12 @@ def main():
action="store_true", action="store_true",
help="Skip GPU detection and information collection (useful for CI environments without GPU access)", help="Skip GPU detection and information collection (useful for CI environments without GPU access)",
) )
parser.add_argument(
"--no-framework-check",
dest="no_framework_check",
action="store_true",
help="Skip LLM framework package checks (vllm, sglang, tensorrt_llm)",
)
args = parser.parse_args() args = parser.parse_args()
# Validate mutual exclusion # Validate mutual exclusion
...@@ -3013,6 +3029,7 @@ def main(): ...@@ -3013,6 +3029,7 @@ def main():
terse=args.terse or args.json_output, terse=args.terse or args.json_output,
runtime_check=args.runtime_check, runtime_check=args.runtime_check,
no_gpu_check=args.no_gpu_check, no_gpu_check=args.no_gpu_check,
no_framework_check=args.no_framework_check,
) )
framework_errors = has_framework_errors(tree) framework_errors = has_framework_errors(tree)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment