-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update prophet with reduced false errors #552
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe changes in this pull request focus on modifications to 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 (
|
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 (2)
prediction_market_agent/agents/prophet_agent/deploy.py (2)
161-163
: Consider model version management strategyThe implementation uses date-versioned models (e.g., "gpt-4o-2024-08-06", "o1-preview-2024-09-12"). Consider:
- Implementing a version management strategy to handle model deprecations
- Centralizing temperature constraints in a configuration file
- Adding validation for temperature settings
Consider creating a model configuration class:
class ModelConfig: def __init__(self, name: str, supported_temperatures: list[float]): self.name = name self.supported_temperatures = supported_temperatures def validate_temperature(self, temp: float) -> None: if temp not in self.supported_temperatures: raise ValueError(f"Model {self.name} only supports temperatures: {self.supported_temperatures}")Also applies to: 186-194, 208-216
Line range hint
78-79
: Consider externalizing the deployment date configurationThe hardcoded deployment date (
2024, 10, 31
) could cause issues if:
- The code is redeployed to other environments
- The date needs to be adjusted for different trading strategies
Consider moving this to a configuration file or environment variable:
from datetime import datetime from prediction_market_agent_tooling.tools.utils import DatetimeUTC class Config: MARKET_TRADE_START_DATE: DatetimeUTC = DatetimeUTC.fromisoformat( os.getenv('MARKET_TRADE_START_DATE', '2024-10-31T00:00:00Z') )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (2)
poetry.lock
is excluded by!**/*.lock
,!**/*.lock
pyproject.toml
is excluded by!**/*.toml
📒 Files selected for processing (1)
prediction_market_agent/agents/prophet_agent/deploy.py
(2 hunks)
🔇 Additional comments (1)
prediction_market_agent/agents/prophet_agent/deploy.py (1)
41-41
: Verify error handling for None predictions
The removal of the None
check on prediction.outcome_prediction
could potentially lead to NoneType
errors. While this aligns with reducing "false errors" (PR objective), we should ensure that:
- The upstream
predict
method guarantees non-Noneoutcome_prediction
- Or the caller properly handles potential
None
returns
No description provided.