Skip to content
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

Reduce bet_on_n_markets_per_run for expensive agents #534

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions prediction_market_agent/agents/prophet_agent/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def load(self) -> None:

class DeployablePredictionProphetGPTo1PreviewAgent(DeployableTraderAgentER):
agent: PredictionProphetAgent
bet_on_n_markets_per_run = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistent implementation of bet limits for expensive agents

The codebase analysis reveals several inconsistencies with the PR objective of reducing bets for expensive agents:

  • DeployableTraderAgentER (base class) has bet_on_n_markets_per_run = 3
  • DeployablePredictionProphetGPT4oAgent still has a high value of bet_on_n_markets_per_run = 20
  • DeployablePredictionProphetGPTo1PreviewAgent reduces to bet_on_n_markets_per_run = 2
  • DeployablePredictionProphetGPTo1MiniAgent inherits the base class value of 3, which is higher than the preview agent despite being a smaller model

The current implementation doesn't fully align with the PR objective. The GPT-4 agent's high value of 20 should be reduced, and the mini agent should have a lower or equal value compared to the preview agent since it's meant to be more cost-efficient.

🔗 Analysis chain

Consider if bet_on_n_markets_per_run=2 aligns with the PR objective.

While this reduction from the default 3 to 2 is a step in the right direction for expensive agents, it's worth verifying if this specific value was chosen based on performance metrics or cost analysis.

Let's verify the relative costs of different models to ensure the reduction is appropriately applied:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for model configurations and their associated bet_on_n_markets_per_run values
echo "Analyzing model configurations and their bet limits..."
rg -A 5 "model\s*=\s*[\"']" --glob "prediction_market_agent/**/*.py"

Length of output: 2302


Script:

#!/bin/bash
# Let's search for all bet_on_n_markets_per_run configurations
echo "Searching for bet_on_n_markets_per_run configurations..."
rg -B 5 -A 5 "bet_on_n_markets_per_run\s*=" --glob "prediction_market_agent/**/*.py"

# Also search for class definitions to understand the hierarchy
echo -e "\nSearching for relevant agent classes..."
rg -B 2 -A 5 "class.*Prophet.*Agent" --glob "prediction_market_agent/**/*.py"

Length of output: 10450


def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
return KellyBettingStrategy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class DeployableThinkThoroughlyAgentBase(DeployableTraderAgent):
agent_class: type[ThinkThoroughlyBase]
model: str
bet_on_n_markets_per_run = 2
bet_on_n_markets_per_run = 1

def load(self) -> None:
self.agent = self.agent_class(
Expand Down
Loading