-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add description to agent market #308
Conversation
WalkthroughThe recent changes introduce a Changes
Sequence Diagram(s)No sequence diagrams necessary as the changes are primarily attribute additions and minor renaming across multiple files. 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 as PR comments)
Additionally, you can add CodeRabbit Configration 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- prediction_market_agent_tooling/markets/agent_market.py (1 hunks)
- prediction_market_agent_tooling/markets/manifold/manifold.py (3 hunks)
- prediction_market_agent_tooling/markets/metaculus/metaculus.py (1 hunks)
- prediction_market_agent_tooling/markets/omen/omen.py (1 hunks)
- prediction_market_agent_tooling/markets/polymarket/polymarket.py (1 hunks)
- tests/markets/test_betting_strategies.py (1 hunks)
- tests/test_benchmark.py (8 hunks)
Files skipped from review due to trivial changes (1)
- prediction_market_agent_tooling/markets/omen/omen.py
Additional comments not posted (13)
prediction_market_agent_tooling/markets/polymarket/polymarket.py (1)
34-34
: LGTM!The
description
attribute is correctly added to thefrom_data_model
method.prediction_market_agent_tooling/markets/metaculus/metaculus.py (1)
28-30
: LGTM!The
description
attribute is correctly added to theMetaculusAgentMarket
class with a default value ofNone
.prediction_market_agent_tooling/markets/manifold/manifold.py (1)
21-21
: LGTM!The
description
attribute is correctly added to thefrom_data_model
method, and the class name references are updated toFullManifoldMarket
.Also applies to: 62-66, 105-105
tests/markets/test_betting_strategies.py (1)
146-146
: LGTM!The
description
parameter is correctly added to theManifoldAgentMarket
instantiation with a default value ofNone
.prediction_market_agent_tooling/markets/agent_market.py (1)
50-50
: LGTM! The addition of thedescription
attribute is correctly implemented.The
description
attribute is added with appropriate type hints.tests/test_benchmark.py (8)
69-69
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
116-116
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
184-184
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
210-210
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
224-224
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
239-239
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
254-254
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
269-269
: LGTM! The addition of thedescription
parameter is correctly implemented.The
description
parameter is added with a default value ofNone
to the instantiation ofPolymarketAgentMarket
.
@@ -25,6 +25,9 @@ class MetaculusAgentMarket(AgentMarket): | |||
|
|||
have_predicted: bool | |||
base_url: t.ClassVar[str] = METACULUS_API_BASE_URL | |||
description: str | None = ( |
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.
They do have Resolution Criteria
and Fine Print
, which are similar to manifold descriptions. Could do description = resolution_criteria
or description = resolution_criteria + "\n" + fine_print
.
Happy if you create an issue for a separate PR though.
e.g. see https://www.metaculus.com/questions/25755/biden-announces-drop-out-before-july-15-2024/
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.
Seems like they aren't available in the MetaculusQuestion model:
prediction-market-agent-tooling/prediction_market_agent_tooling/markets/metaculus/data_models.py
Line 54 in 1d242ca
class MetaculusQuestion(BaseModel): |
@coderabbitai Please create an issue to check out if we can get this extra information from some API.
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.
@kongzii, I have created an issue to investigate if we can fetch the resolution criteria and fine print for Metaculus markets from some API. You can track the progress of this issue here: Issue #310.
Analysis chain
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
gh issue create --title "Investigate fetching resolution criteria and fine print for Metaculus markets from API" --body "The current implementation for MetaculusAgentMarket in the PR [#308](https://github.com/gnosis/prediction-market-agent-tooling/pull/308) does not include resolution criteria and fine print as part of the description because they are not available in the MetaculusQuestion model.
Please investigate if it's possible to fetch this additional information (resolution criteria and fine print) from some API endpoint.
For reference, see the discussion in [this comment](https://github.com/gnosis/prediction-market-agent-tooling/pull/308#discussion_r1675603063)." --assignee kongzii
Length of output: 773
Learnings added
Learnt from: kongzii
PR: gnosis/prediction-market-agent-tooling#308
File: prediction_market_agent_tooling/markets/metaculus/metaculus.py:28-28
Timestamp: 2024-07-12T09:59:36.342Z
Learning: When the user requests to create an issue for investigating additional information from an API, include the relevant PR and comment links in the issue description.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
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.
Ah you're right, from a quick look it seems the fields are only available on the question creation and updating endpoints https://www.metaculus.com/api2/schema/redoc/#tag/questions/operation/questions_list
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.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
No description provided.