From 18fc7bb3e938423ca39b79a9e6e41593efeb9d59 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Sat, 13 May 2023 15:44:29 +0100 Subject: [PATCH 1/2] fix: add missing package --- poetry.lock | 46 +++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 29fcfc73..396d52c2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2168,6 +2168,29 @@ werkzeug = "2.0.3" all = ["click (==8.0.2)", "open-aea-cli-ipfs (==1.33.0)", "open-aea-ledger-ethereum-hwi (==1.33.0)"] cli = ["click (==8.0.2)", "open-aea-cli-ipfs (==1.33.0)", "open-aea-ledger-ethereum-hwi (==1.33.0)"] +[[package]] +name = "openai" +version = "0.27.2" +description = "Python client library for the OpenAI API" +category = "main" +optional = false +python-versions = ">=3.7.1" +files = [ + {file = "openai-0.27.2-py3-none-any.whl", hash = "sha256:6df674cf257e9e0504f1fd191c333d3f6a2442b13218d0eccf06230eb24d320e"}, + {file = "openai-0.27.2.tar.gz", hash = "sha256:5869fdfa34b0ec66c39afa22f4a0fb83a135dff81f6505f52834c6ab3113f762"}, +] + +[package.dependencies] +aiohttp = "*" +requests = ">=2.20" +tqdm = "*" + +[package.extras] +datalib = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] +dev = ["black (>=21.6b0,<22.0)", "pytest (>=6.0.0,<7.0.0)", "pytest-asyncio", "pytest-mock"] +embeddings = ["matplotlib", "numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "plotly", "scikit-learn (>=1.0.2)", "scipy", "tenacity (>=8.0.1)"] +wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "wandb"] + [[package]] name = "packaging" version = "21.3" @@ -3097,6 +3120,27 @@ files = [ {file = "toolz-0.12.0.tar.gz", hash = "sha256:88c570861c440ee3f2f6037c4654613228ff40c93a6c25e0eba70d17282c6194"}, ] +[[package]] +name = "tqdm" +version = "4.65.0" +description = "Fast, Extensible Progress Meter" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tqdm-4.65.0-py3-none-any.whl", hash = "sha256:c4f53a17fe37e132815abceec022631be8ffe1b9381c2e6e30aa70edc99e9671"}, + {file = "tqdm-4.65.0.tar.gz", hash = "sha256:1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["py-make (>=0.1.0)", "twine", "wheel"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + [[package]] name = "typing-extensions" version = "4.5.0" @@ -3480,4 +3524,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "e6dbd94bdbfea649ffbe867ce192035efdc5bb8c9541cdeca9c614eb5765951d" +content-hash = "aac58afc8873cd8dabf64ea6f41c43ad8c7efb666c9b9d0302ea1cc8d1545377" diff --git a/pyproject.toml b/pyproject.toml index 619b9174..1c3da6ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ open-autonomy = "==0.10.4" autonomy-dev = "^0.1.1" mypy = "^1.3.0" pylint = "^2.17.4" +openai = "0.27.2" [tool.poetry.group.dev.dependencies] From 53a9da905561692d61ac8dd961e5742735be6d72 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Sat, 13 May 2023 15:49:20 +0100 Subject: [PATCH 2/2] fix: counter bug --- packages/eightballer/agents/mech/aea-config.yaml | 4 ++-- packages/eightballer/services/mech/service.yaml | 2 +- packages/packages.json | 10 +++++----- packages/valory/services/mech/service.yaml | 2 +- packages/valory/skills/mech_abci/skill.yaml | 2 +- packages/valory/skills/multiplexer_abci/behaviours.py | 1 + packages/valory/skills/multiplexer_abci/rounds.py | 2 +- packages/valory/skills/multiplexer_abci/skill.yaml | 4 ++-- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/eightballer/agents/mech/aea-config.yaml b/packages/eightballer/agents/mech/aea-config.yaml index 889c235f..458d8210 100644 --- a/packages/eightballer/agents/mech/aea-config.yaml +++ b/packages/eightballer/agents/mech/aea-config.yaml @@ -32,8 +32,8 @@ skills: - eightballer/contract_subscription:0.1.0:bafybeidhgfkrxh7ki56ua2fg27vpu2doxri7lh2yqlag6vf64e6e6qtsne - valory/abstract_abci:0.1.0:bafybeihgerjeq4u4apuue7zzhpb3wmntuju34dbdijbbvl4wclww2gy7di - valory/abstract_round_abci:0.1.0:bafybeicensk7a2vpqj52iyhf6yhc6z2iwulb2txbym546qvwgsxm3skvcm -- valory/mech_abci:0.1.0:bafybeibufvqnkicu54md6tvo2eiarrrahiorxutgvdn2jhklqon4qa47va -- valory/multiplexer_abci:0.1.0:bafybeicnh2xwfw64acq6g2xjvnh3whhjgacn373egxxodzjpnzrryubjka +- valory/mech_abci:0.1.0:bafybeibkeakq3yk7ezddyyvihkfuue2fs5ie7bvmffhjxica6x7if4uxlm +- valory/multiplexer_abci:0.1.0:bafybeig7oiekvvbgja6gjmi7dprhmixdyuefbis4s2et2ptab6xh5nomfy - valory/registration_abci:0.1.0:bafybeicsqhakfliwauyqow62yopcjhejknmfcjzh7ilbjt32ozydbhxleq - valory/reset_pause_abci:0.1.0:bafybeigwsp2crzvqan7xnap6dh4f4lxdut5il6naj7r4jwaslopstufgl4 - valory/task_execution_abci:0.1.0:bafybeih3zsp26c6rkki5lq2t6vxyk6yls6odiwhad4kzsbrwguslnouple diff --git a/packages/eightballer/services/mech/service.yaml b/packages/eightballer/services/mech/service.yaml index 6e079142..4a4fed87 100644 --- a/packages/eightballer/services/mech/service.yaml +++ b/packages/eightballer/services/mech/service.yaml @@ -6,7 +6,7 @@ aea_version: '>=1.0.0, <2.0.0' license: Apache-2.0 fingerprint: {} fingerprint_ignore_patterns: [] -agent: eightballer/mech:0.1.0:bafybeiac4tdys65eftjtpujnxgxuxvzw6ics3nlzikxett5yp6ybwy2uci +agent: eightballer/mech:0.1.0:bafybeiaez5gnporerx6bhm5rao5naterknx7bgi66yuyg4p3zl7vxjbdfm number_of_agents: 1 deployment: {} --- diff --git a/packages/packages.json b/packages/packages.json index 9dcff134..4c6f2c5e 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -2,14 +2,14 @@ "dev": { "connection/eightballer/websocket_client/0.1.0": "bafybeihwcracii3fvvdbvku2wmz7ephsi6dlhycisq5yn3xemryxovqn5i", "skill/eightballer/contract_subscription/0.1.0": "bafybeidhgfkrxh7ki56ua2fg27vpu2doxri7lh2yqlag6vf64e6e6qtsne", - "agent/eightballer/mech/0.1.0": "bafybeiac4tdys65eftjtpujnxgxuxvzw6ics3nlzikxett5yp6ybwy2uci", - "service/eightballer/mech/0.1.0": "bafybeif6scubpapidoqberaqcvt4gyvcfhymg62o7ejibvddhtps35onpa", - "skill/valory/multiplexer_abci/0.1.0": "bafybeicnh2xwfw64acq6g2xjvnh3whhjgacn373egxxodzjpnzrryubjka", + "agent/eightballer/mech/0.1.0": "bafybeiaez5gnporerx6bhm5rao5naterknx7bgi66yuyg4p3zl7vxjbdfm", + "service/eightballer/mech/0.1.0": "bafybeiftk2t4qspjnzrfpnrb5r3baurdfaui4gpywvojplpgmmzohlj3wi", + "skill/valory/multiplexer_abci/0.1.0": "bafybeig7oiekvvbgja6gjmi7dprhmixdyuefbis4s2et2ptab6xh5nomfy", "skill/valory/task_execution_abci/0.1.0": "bafybeih3zsp26c6rkki5lq2t6vxyk6yls6odiwhad4kzsbrwguslnouple", - "skill/valory/mech_abci/0.1.0": "bafybeibufvqnkicu54md6tvo2eiarrrahiorxutgvdn2jhklqon4qa47va", + "skill/valory/mech_abci/0.1.0": "bafybeibkeakq3yk7ezddyyvihkfuue2fs5ie7bvmffhjxica6x7if4uxlm", "skill/valory/transaction_preparation_abci/0.1.0": "bafybeifjcan7yqnscsnw3x6536nfubz5zpjot7zo5egpqzfovpoqieus64", "contract/valory/agent_mech/0.1.0": "bafybeifjjnnbtqttvq3ox5fpmdbppl5vzkcbfdnxes3bdt4z53ayet2yiy", - "service/valory/mech/0.1.0": "bafybeicy2j3yybnvsvb26tcfsti2uhblguanzt3k4bbk27g57ssf7htkme" + "service/valory/mech/0.1.0": "bafybeihdovyzkchwluiptndrz4h7qjtqjey2nfhtios2ome5w7qmqmy3ta" }, "third_party": { "protocol/fetchai/default/1.0.0": "bafybeig3w57l7laofhuyl7nco2lfzgtbqf4cto75edfccymugtixjqnm6y", diff --git a/packages/valory/services/mech/service.yaml b/packages/valory/services/mech/service.yaml index aab122ab..e65b9a3e 100644 --- a/packages/valory/services/mech/service.yaml +++ b/packages/valory/services/mech/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba fingerprint_ignore_patterns: [] -agent: eightballer/mech:0.1.0:bafybeiac4tdys65eftjtpujnxgxuxvzw6ics3nlzikxett5yp6ybwy2uci +agent: eightballer/mech:0.1.0:bafybeiaez5gnporerx6bhm5rao5naterknx7bgi66yuyg4p3zl7vxjbdfm number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/mech_abci/skill.yaml b/packages/valory/skills/mech_abci/skill.yaml index c79d22d5..62a24684 100644 --- a/packages/valory/skills/mech_abci/skill.yaml +++ b/packages/valory/skills/mech_abci/skill.yaml @@ -19,7 +19,7 @@ contracts: [] protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeicensk7a2vpqj52iyhf6yhc6z2iwulb2txbym546qvwgsxm3skvcm -- valory/multiplexer_abci:0.1.0:bafybeicnh2xwfw64acq6g2xjvnh3whhjgacn373egxxodzjpnzrryubjka +- valory/multiplexer_abci:0.1.0:bafybeig7oiekvvbgja6gjmi7dprhmixdyuefbis4s2et2ptab6xh5nomfy - valory/registration_abci:0.1.0:bafybeicsqhakfliwauyqow62yopcjhejknmfcjzh7ilbjt32ozydbhxleq - valory/reset_pause_abci:0.1.0:bafybeigwsp2crzvqan7xnap6dh4f4lxdut5il6naj7r4jwaslopstufgl4 - valory/task_execution_abci:0.1.0:bafybeih3zsp26c6rkki5lq2t6vxyk6yls6odiwhad4kzsbrwguslnouple diff --git a/packages/valory/skills/multiplexer_abci/behaviours.py b/packages/valory/skills/multiplexer_abci/behaviours.py index eca425fa..5e8823a5 100644 --- a/packages/valory/skills/multiplexer_abci/behaviours.py +++ b/packages/valory/skills/multiplexer_abci/behaviours.py @@ -60,6 +60,7 @@ def async_act(self) -> Generator: period_counter = self.synchronized_data.period_counter do_reset = period_counter % self.params.reset_period_count == 0 + self.context.logger.info(f"Period counter: {period_counter}/{self.params.reset_period_count}. Do reset? {do_reset}") if self.context.shared_state["pending_tasks"]: payload_content = MultiplexerRound.EXECUTE_PAYLOAD diff --git a/packages/valory/skills/multiplexer_abci/rounds.py b/packages/valory/skills/multiplexer_abci/rounds.py index dc76df1c..585d30ca 100644 --- a/packages/valory/skills/multiplexer_abci/rounds.py +++ b/packages/valory/skills/multiplexer_abci/rounds.py @@ -48,7 +48,7 @@ class SynchronizedData(BaseSynchronizedData): @property def period_counter(self) -> int: """Get the period_counter.""" - return cast(int, self.db.get("period_counter", 0)) + return cast(int, self.db.get("period_counter", 1)) class MultiplexerRound(CollectSameUntilThresholdRound): """MultiplexerRound""" diff --git a/packages/valory/skills/multiplexer_abci/skill.yaml b/packages/valory/skills/multiplexer_abci/skill.yaml index dd6dd40b..eeff8892 100644 --- a/packages/valory/skills/multiplexer_abci/skill.yaml +++ b/packages/valory/skills/multiplexer_abci/skill.yaml @@ -7,13 +7,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeihmlhtsobnj6vrhthmy3bgnwbb2x27wjbzea35ypraag6bgbazr4e - behaviours.py: bafybeiavf36mpv5uqhmqz2ozj45l5junuhap63cq65k526smmkooyowuam + behaviours.py: bafybeibmi3mz7wwh7j5kqwd4462mu3x7afrckrv6jmwpolqf5j2yfp6lj4 dialogues.py: bafybeiew6j4u7ggc43scytblq7r6ulijcbqr2tjvtp7cr6hru4sb3irl3m fsm_specification.yaml: bafybeibmbpdgq7h6sgaxtdb2aawha5xdwd6oszbn3nwr2tolaijoswkfly handlers.py: bafybeifuvjckl3yjdwjoz6uj3sbdbmcesggfuidolfzpvfbnhb4e73wxb4 models.py: bafybeiagy2uislg4scfhrycfdasrss6styw4q7aeztozwbjtumth3juuxu payloads.py: bafybeibhg7q5ejfhjkjvcfeqjyzp32msn4alu5btnywimh2zd5arr2f2mm - rounds.py: bafybeie7v3fxxycbtvsqkwz3zoi4g4a5jk4dq574e3y7tzeezmp4ijt3ae + rounds.py: bafybeiaemvgm6j6vycfwvelp7ig3puprh2g2yygixb6uymnczln6zi6hx4 fingerprint_ignore_patterns: [] connections: [] contracts: []