-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add logging for response deadline filtering #91
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request modifies two functions in Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Function Caller
participant WO as write_output
participant Logger as Logger
Caller->>WO: Invoke write_output()
WO->>WO: Calculate req_filtered (count of delayed requests)
alt Some requests completed
WO->>Logger: Log count of filtered requests
else No requests completed
WO->>Logger: Log error message
end
WO->>Caller: Return output
sequenceDiagram
participant Caller as Function Caller
participant GS as get_summary
Caller->>GS: Call get_summary(df, output_obj, summary_key)
GS->>GS: Process summary statistics
GS->>GS: Replace NaN values with None
GS->>Caller: Return cleaned summary
Assessment against linked issues
Poem
Tip 🌐 Web search-backed reviews and chat
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
utils.py (1)
250-253
: Consider using dictionary comprehension for better readability.The NaN replacement logic is correct and aligns with the objective. However, it can be made more concise using dictionary comprehension.
Consider this optimization:
- # Replace NaNs with None - output_obj["summary"][summary_key].update( - {k: None for k, v in output_obj["summary"][summary_key].items() if np.isnan(v)} - ) + # Replace NaNs with None + output_obj["summary"][summary_key] = { + k: None if np.isnan(v) else v + for k, v in output_obj["summary"][summary_key].items() + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
utils.py
(2 hunks)
🔇 Additional comments (1)
utils.py (1)
179-183
: LGTM! Enhanced logging for deadline filtering.The added logging provides valuable insights into filtered requests and helps identify test runs where no requests completed within their deadline.
Adds logging for filtering out responses that arrived after their deadline. Also replaces NaNs in summery section with
null
to avoid invalid json.Closes #90
Summary by CodeRabbit