From 5a662ffe383971d68f1471fa5c0e4d7087369f13 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Tue, 7 May 2024 15:56:18 +0200 Subject: [PATCH] Bump to 0.24.0 (#5) --- poetry.lock | 49 ++++++++++--------- .../agents/prophet_agent/deploy.py | 12 ++--- predictionprophet_deployment/run_agent.py | 2 +- pyproject.toml | 2 +- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/poetry.lock b/poetry.lock index a6f3252..ed19c5c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -495,13 +495,13 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "blinker" -version = "1.8.1" +version = "1.8.2" description = "Fast, simple object-to-object and broadcast signaling" optional = false python-versions = ">=3.8" files = [ - {file = "blinker-1.8.1-py3-none-any.whl", hash = "sha256:5f1cdeff423b77c31b89de0565cd03e5275a03028f44b2b15f912632a58cced6"}, - {file = "blinker-1.8.1.tar.gz", hash = "sha256:da44ec748222dcd0105ef975eed946da197d5bdf8bafb6aa92f5bc89da63fa25"}, + {file = "blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01"}, + {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, ] [[package]] @@ -2828,13 +2828,13 @@ extended-testing = ["aiosqlite (>=0.19.0,<0.20.0)", "aleph-alpha-client (>=2.15. [[package]] name = "langchain-core" -version = "0.1.50" +version = "0.1.52" description = "Building applications with LLMs through composability" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langchain_core-0.1.50-py3-none-any.whl", hash = "sha256:19d57477de5ebcb55febc3bc94c6c9aac62a6199b0802cfa326ca718d84d985e"}, - {file = "langchain_core-0.1.50.tar.gz", hash = "sha256:a01e3149a117ed00ef086cc74d8d1b9437d650a0a3c80c8a3786f4dcbb8d1ef9"}, + {file = "langchain_core-0.1.52-py3-none-any.whl", hash = "sha256:62566749c92e8a1181c255c788548dc16dbc319d896cd6b9c95dc17af9b2a6db"}, + {file = "langchain_core-0.1.52.tar.gz", hash = "sha256:084c3fc452f5a6966c28ab3ec5dbc8b8d26fc3f63378073928f4e29d90b6393f"}, ] [package.dependencies] @@ -2902,13 +2902,13 @@ test = ["pytest", "pytest-cov"] [[package]] name = "langfuse" -version = "2.29.0" +version = "2.29.1" description = "A client library for accessing langfuse" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langfuse-2.29.0-py3-none-any.whl", hash = "sha256:e0bbb49ca4da3f8a4f51aab0ad47c975def6167e318fbb8cfefe7f457bd7a020"}, - {file = "langfuse-2.29.0.tar.gz", hash = "sha256:e18053f5670c4c1165d233dc620f0cb5f9890af60519ef0de38cff6cc2e22a38"}, + {file = "langfuse-2.29.1-py3-none-any.whl", hash = "sha256:73819e8c62c9aa5de531ee9aa986b50bf6090eda300c10243fff2a0ffdb1e48e"}, + {file = "langfuse-2.29.1.tar.gz", hash = "sha256:320a5e739863f500292ecc1eeb75648eb7337af6cf38ce21c1f50f7767796840"}, ] [package.dependencies] @@ -3797,13 +3797,13 @@ sympy = "*" [[package]] name = "openai" -version = "1.25.2" +version = "1.26.0" description = "The official Python library for the openai API" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-1.25.2-py3-none-any.whl", hash = "sha256:8df66384343e81ae49f5b9ee7d2d67df3b98d578d1e3a50994111e1c6062bf5e"}, - {file = "openai-1.25.2.tar.gz", hash = "sha256:a2b4a6ae9afb8b5578b5b69315ecc6c01564d4c8dbe18fe2375bb9547ff5038c"}, + {file = "openai-1.26.0-py3-none-any.whl", hash = "sha256:884ced523fb0225780f8b0e0ed6f7e014049c32d049a41ad0ac962869f1055d1"}, + {file = "openai-1.26.0.tar.gz", hash = "sha256:642e857b60855702ee6ff665e8fa80946164f77b92e58fd24e01b545685b8405"}, ] [package.dependencies] @@ -4299,13 +4299,13 @@ test = ["coverage", "flake8", "freezegun (==0.3.15)", "mock (>=2.0.0)", "pylint" [[package]] name = "prediction-market-agent-tooling" -version = "0.23.0" +version = "0.24.0" description = "Tools to benchmark, deploy and monitor prediction market agents." optional = false python-versions = "<3.12,>=3.10" files = [ - {file = "prediction_market_agent_tooling-0.23.0-py3-none-any.whl", hash = "sha256:2394202d8093d61686e5ad2fda5c4d9305f86d1d7cfd19d222d695ad4f704fd8"}, - {file = "prediction_market_agent_tooling-0.23.0.tar.gz", hash = "sha256:ea2ebb1d9262e5b03c76c1c302b4a30e62ab9d7fe9d472bdeb417e8b54a55474"}, + {file = "prediction_market_agent_tooling-0.24.0-py3-none-any.whl", hash = "sha256:9c7d38668e01d9240a3d145faddc4fec37241cfb5522f9cfa81bc9f2f1fbc2a0"}, + {file = "prediction_market_agent_tooling-0.24.0.tar.gz", hash = "sha256:75397d82ed8d5f1e31a4dea840dc01a8341e66f3c4eae839fa190cd4c0304cbb"}, ] [package.dependencies] @@ -4369,7 +4369,7 @@ matplotlib = "^3.8.3" memory-profiler = "^0.61.0" openai = "^1.10.0" pandas = "2.1.1" -prediction-market-agent-tooling = {version = "^0.23.0", extras = ["google", "langchain"]} +prediction-market-agent-tooling = {version = "^0.24.0", extras = ["google", "langchain"]} pyautogen = "^0.2.19" pysqlite3-binary = {version = "^0.5.2.post3", markers = "sys_platform == \"linux\""} pytest = "^8.0.0" @@ -4389,8 +4389,8 @@ watchdog = "^3.0.0" [package.source] type = "git" url = "https://github.com/polywrap/predictionprophet" -reference = "d74a96456704dfc21cb049393123192facce91ac" -resolved_reference = "d74a96456704dfc21cb049393123192facce91ac" +reference = "2eb5367848f1a7c17f73d0851748eaf03c008137" +resolved_reference = "2eb5367848f1a7c17f73d0851748eaf03c008137" [[package]] name = "preshed" @@ -6075,17 +6075,18 @@ tiktoken = ">=0.5.2,<1" [[package]] name = "tenacity" -version = "8.2.3" +version = "8.3.0" description = "Retry code until it succeeds" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "tenacity-8.2.3-py3-none-any.whl", hash = "sha256:ce510e327a630c9e1beaf17d42e6ffacc88185044ad85cf74c0a8887c6a0f88c"}, - {file = "tenacity-8.2.3.tar.gz", hash = "sha256:5398ef0d78e63f40007c1fb4c0bff96e1911394d2fa8d194f77619c05ff6cc8a"}, + {file = "tenacity-8.3.0-py3-none-any.whl", hash = "sha256:3649f6443dbc0d9b01b9d8020a9c4ec7a1ff5f6f3c6c8a036ef371f573fe9185"}, + {file = "tenacity-8.3.0.tar.gz", hash = "sha256:953d4e6ad24357bceffbc9707bc74349aca9d245f68eb65419cf0c249a1949a2"}, ] [package.extras] -doc = ["reno", "sphinx", "tornado (>=4.5)"] +doc = ["reno", "sphinx"] +test = ["pytest", "tornado (>=4.5)", "typeguard"] [[package]] name = "termcolor" @@ -7186,4 +7187,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.10.0" -content-hash = "567f1a6779f7e79489e84bc4422d0f38481672296c945eb6cf4b996e9b2214d5" +content-hash = "dec86c11ae9721ec480641f09a883a94e6bc53a7b53c51c80eab035a8b257470" diff --git a/predictionprophet_deployment/agents/prophet_agent/deploy.py b/predictionprophet_deployment/agents/prophet_agent/deploy.py index ed6e0d4..26ea330 100644 --- a/predictionprophet_deployment/agents/prophet_agent/deploy.py +++ b/predictionprophet_deployment/agents/prophet_agent/deploy.py @@ -6,7 +6,7 @@ from prediction_market_agent_tooling.deploy.agent import ( Answer, BetAmount, - DeployableAgent, + DeployableTraderAgent, ) from prediction_market_agent_tooling.gtypes import Probability from prediction_market_agent_tooling.loggers import logger @@ -38,7 +38,7 @@ ) -class DeployableAgentER(DeployableAgent): +class DeployableTraderAgentER(DeployableTraderAgent): agent: AbstractBenchmarkedAgent max_markets_per_run = 5 @@ -134,21 +134,21 @@ def answer_binary_market(self, market: AgentMarket) -> Answer | None: return prediciton.outcome_prediction -class DeployablePredictionProphetGPT3Agent(DeployableAgentER): +class DeployablePredictionProphetGPT3Agent(DeployableTraderAgentER): agent = PredictionProphetAgent(model="gpt-3.5-turbo-0125") -class DeployablePredictionProphetGPT4TurboPreviewAgent(DeployableAgentER): +class DeployablePredictionProphetGPT4TurboPreviewAgent(DeployableTraderAgentER): agent = PredictionProphetAgent(model="gpt-4-0125-preview") # Limit to just 1, because so far it seems that 20x higher costs aren't justified by the prediction performance. max_markets_per_run = 1 -class DeployablePredictionProphetGPT4TurboFinalAgent(DeployableAgentER): +class DeployablePredictionProphetGPT4TurboFinalAgent(DeployableTraderAgentER): agent = PredictionProphetAgent(model="gpt-4-turbo-2024-04-09") # Limit to just 1, because so far it seems that 20x higher costs aren't justified by the prediction performance. max_markets_per_run = 1 -class DeployableOlasEmbeddingOAAgent(DeployableAgentER): +class DeployableOlasEmbeddingOAAgent(DeployableTraderAgentER): agent = OlasAgent(model="gpt-3.5-turbo-0125", embedding_model=EmbeddingModel.openai) diff --git a/predictionprophet_deployment/run_agent.py b/predictionprophet_deployment/run_agent.py index 57c91d1..c0affd8 100644 --- a/predictionprophet_deployment/run_agent.py +++ b/predictionprophet_deployment/run_agent.py @@ -1,6 +1,6 @@ """ Entrypoint for running the agent in GKE. -If the agent adheres to PMAT standard (subclasses DeployableAgent), +If the agent adheres to PMAT standard (subclasses deployable agent), simply add the agent to the `RunnableAgent` enum and then `RUNNABLE_AGENTS` dict. Can also be executed locally, simply by running `python predictionprophet_deployment/run_agent.py `. diff --git a/pyproject.toml b/pyproject.toml index d7b1972..8af3be4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ types-requests = "^2.31.0.20240106" black = "^23.12.1" autoflake = "^2.2.1" isort = "^5.13.2" -prediction-prophet = {git = "https://github.com/polywrap/predictionprophet", rev = "d74a96456704dfc21cb049393123192facce91ac"} +prediction-prophet = {git = "https://github.com/polywrap/predictionprophet", rev = "2eb5367848f1a7c17f73d0851748eaf03c008137"} [build-system] requires = ["poetry-core"]