Skip to content

Commit

Permalink
Fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii committed Feb 15, 2024
1 parent 21a2d11 commit edab35b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
15 changes: 1 addition & 14 deletions examples/cloud_deployment/gcp/deploy.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
import getpass
import random

from prediction_market_agent_tooling.deploy.agent import DeployableAgent
from prediction_market_agent_tooling.markets.data_models import AgentMarket
from prediction_market_agent_tooling.deploy.agent_example import DeployableCoinFlipAgent
from prediction_market_agent_tooling.markets.markets import MarketType


class DeployableCoinFlipAgent(DeployableAgent):
def pick_markets(self, markets: list[AgentMarket]) -> list[AgentMarket]:
if len(markets) > 1:
return random.sample(markets, 1)
return markets

def answer_binary_market(self, market: AgentMarket) -> bool:
return random.choice([True, False])


if __name__ == "__main__":
agent = DeployableCoinFlipAgent()
agent.deploy_gcp(
Expand Down
14 changes: 14 additions & 0 deletions prediction_market_agent_tooling/deploy/agent_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import random

from prediction_market_agent_tooling.deploy.agent import DeployableAgent
from prediction_market_agent_tooling.markets.data_models import AgentMarket


class DeployableCoinFlipAgent(DeployableAgent):
def pick_markets(self, markets: list[AgentMarket]) -> list[AgentMarket]:
if len(markets) > 1:
return random.sample(markets, 1)
return markets

def answer_binary_market(self, market: AgentMarket) -> bool:
return random.choice([True, False])

0 comments on commit edab35b

Please sign in to comment.