-
Notifications
You must be signed in to change notification settings - Fork 638
fix: only log config on debug
log level, fix trtllm warnings
#3590
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: William Arnold <[email protected]>
Signed-off-by: William Arnold <[email protected]>
WalkthroughRefactors config dump logic to compute payload conditionally, add robust file-write fallback to stdout with detailed logging, and emit dumps at DEBUG without files. Extends encoding to optionally process Pydantic models. Adds an encoder registration for TRT-LLM Config objects to serialize via dict. Public APIs remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as Caller
participant CD as ConfigDumper
participant FS as FileSystem
participant Log as Logger
U->>CD: dump_config(dump_config_to=path?)
alt DEBUG logging with no file
Note over CD,Log: Logger at DEBUG
CD->>CD: compute config_dump_payload
CD->>Log: debug(CONFIG_DUMP payload)
else File path provided
CD->>CD: compute config_dump_payload
CD->>FS: write(payload)
alt Write fails (OSError/IOError)
CD->>Log: error("Failed to write... dropping to stdout")
CD-->>U: stdout(CONFIG_DUMP payload)
else Other Exception
CD->>Log: exception("Failed to write... dropping to stdout")
CD-->>U: stdout(CONFIG_DUMP payload)
end
else No path and non-DEBUG
CD-->>U: return payload
end
sequenceDiagram
autonumber
participant TR as trtllm_utils
participant REG as EncoderRegistry
participant EP as EncodingPipeline
participant C as Config
TR->>REG: register_encoder(Config, _preprocess_for_encode_config)
Note over TR,REG: Registration occurs at import time
EP->>C: needs encoding
EP->>REG: lookup encoder for Config
REG-->>EP: _preprocess_for_encode_config
EP->>C: call encoder -> __dict__
EP-->>EP: proceed with downstream encoding
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)components/src/dynamo/trtllm/utils/trtllm_utils.py (3)
🪛 Ruff (0.14.0)components/src/dynamo/common/config_dump/config_dumper.py200-200: Unused function argument: (ARG001) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Small fix that
--dump-config-to
flag is specifiedpydantic
, avoiding some warningsSummary by CodeRabbit
New Features
Bug Fixes
Refactor