-
Notifications
You must be signed in to change notification settings - Fork 4
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
Tweak to lanfguse trace script #543
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
if len(bets_with_traces) == 0: | ||
continue |
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.
To quickly see if the script still works, I like to set start_time
to 1 day ago. But then some agents have 0 bets, in which case the script will throw a divide-by-zero error. This fixes that.
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
🧹 Outside diff range and nitpick comments (1)
examples/monitor/match_bets_with_langfuse_traces.py (1)
210-212
: LGTM! Consider enhancing the logging.The empty check is a good addition to skip unnecessary processing. Consider adding a log message when skipping to make it more explicit in the output.
if len(bets_with_traces) == 0: + print(f"Skipping {agent_name}: No bets with traces found.") continue
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
examples/monitor/match_bets_with_langfuse_traces.py
(2 hunks)
🔇 Additional comments (1)
examples/monitor/match_bets_with_langfuse_traces.py (1)
173-173
:
Verify the start time configuration.
The start time is set to a future date (October 2024), which may cause issues as it's beyond the current date (November 2024). Additionally, please verify that October 1st, 2024 is an appropriate date that satisfies the "after pool token number is stored" requirement mentioned in the comment.
Consider updating to a past date or implementing a dynamic date calculation relative to the current time:
- start_time = utc_datetime(2024, 10, 1)
+ start_time = utc_datetime(2023, 10, 1) # Assuming you meant 2023
# Or use a dynamic approach:
+ from datetime import datetime, timedelta
+ start_time = datetime.utcnow() - timedelta(days=30) # Last 30 days
No description provided.