From c0421a9f2c8fe6009127cd62e8b239fdf756b5d6 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Tue, 26 Mar 2024 08:36:26 +0100 Subject: [PATCH] pick only 1 bet --- prediction_market_agent/agents/known_outcome_agent/deploy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prediction_market_agent/agents/known_outcome_agent/deploy.py b/prediction_market_agent/agents/known_outcome_agent/deploy.py index 36b0166f..7a14e590 100644 --- a/prediction_market_agent/agents/known_outcome_agent/deploy.py +++ b/prediction_market_agent/agents/known_outcome_agent/deploy.py @@ -57,6 +57,11 @@ def pick_markets(self, markets: list[AgentMarket]) -> list[AgentMarket]: picked_markets.append(market) self.markets_with_known_outcomes[market.id] = answer.result + # Return as soon as we have picked a market, because otherwise it will take too long and we will run out of time in GCP Function (540s timeout) + # TODO: After PMAT is updated in this repository, we can return `None` in `answer_binary_market` method and PMAT won't place the bet. + # So we can move this logic out of `pick_markets` into `answer_binary_market`, and simply process as many bets as we have time for. + return picked_markets + else: print( f"Skipping market {market.id=} {market.question=}, because it is already saturated."