Skip to content

Commit

Permalink
Bump PMAT version to 0.9.3, simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
evangriffiths committed Apr 5, 2024
1 parent 82c8142 commit 3006a31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions prediction_market_agent/agents/known_outcome_agent/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
from prediction_market_agent_tooling.deploy.constants import OWNER_KEY
from prediction_market_agent_tooling.gtypes import SecretStr, private_key_type
from prediction_market_agent_tooling.markets.agent_market import AgentMarket
from prediction_market_agent_tooling.markets.data_models import BetAmount, Currency
from prediction_market_agent_tooling.markets.data_models import BetAmount
from prediction_market_agent_tooling.markets.markets import MarketType
from prediction_market_agent_tooling.markets.omen.omen import OmenAgentMarket
from prediction_market_agent_tooling.tools.utils import (
check_not_none,
get_current_git_commit_sha,
get_current_git_url,
should_not_happen,
)

from prediction_market_agent.agents.known_outcome_agent.known_outcome_agent import (
Expand Down Expand Up @@ -83,17 +82,7 @@ def answer_binary_market(self, market: AgentMarket) -> bool | None:

def calculate_bet_amount(self, answer: bool, market: AgentMarket) -> BetAmount:
if isinstance(market, OmenAgentMarket):
if market.currency != Currency.xDai:
should_not_happen()
return BetAmount(
# On markets without liquidity, bet just a small amount for benchmarking.
amount=(
Decimal(1.0)
if market.get_liquidity_in_xdai() > 5
else market.get_tiny_bet_amount().amount
),
currency=Currency.xDai,
)
return BetAmount(amount=(Decimal(1.0)), currency=market.currency)
else:
raise NotImplementedError("This agent only supports xDai markets")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ poetry = "^1.7.1"
poetry-plugin-export = "^1.6.0"
functions-framework = "^3.5.0"
cron-validator = "^1.0.8"
prediction-market-agent-tooling = "^0.9.1"
prediction-market-agent-tooling = "^0.9.3"
pydantic-settings = "^2.1.0"
autoflake = "^2.2.1"
isort = "^5.13.2"
Expand Down

0 comments on commit 3006a31

Please sign in to comment.