From 5018e9c6b5e36428752cb06c4f36b9287e6bcc97 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Thu, 13 Jun 2024 15:38:37 +0300 Subject: [PATCH 1/2] fix: handle the case when utilized tools file does not exist --- .../decision_maker_abci/behaviours/tool_selection.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/tool_selection.py b/packages/valory/skills/decision_maker_abci/behaviours/tool_selection.py index fc80d7483..0bff040b1 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/tool_selection.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/tool_selection.py @@ -299,11 +299,15 @@ def _try_recover_policy(self) -> Optional[EGreedyPolicy]: def _try_recover_utilized_tools(self) -> Dict[str, int]: """Try to recover the available tools from the tools store.""" tools_path = self.params.store_path / self.UTILIZED_TOOLS_STORE - with open(tools_path, "r") as tools_file: - try: + try: + with open(tools_path, "r") as tools_file: return json.load(tools_file) - except Exception as exc: - self.context.logger.warning(f"Could not recover the tools: {exc}.") + except FileNotFoundError: + msg = "No file with pending rewards for the policy were found in the local storage." + self.context.logger.info(msg) + except Exception as exc: + msg = f"Could not recover the pending rewards for the policy: {exc}." + self.context.logger.warning(msg) return {} def _try_recover_mech_tools(self) -> Optional[List[str]]: From 4f4e4bf9d7da6de481d726d2c4dc096aaa75a838 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Thu, 13 Jun 2024 16:44:27 +0300 Subject: [PATCH 2/2] chore: run generators --- packages/packages.json | 10 +++++----- packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/skills/decision_maker_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index c3fdc1d53..96c7f3f96 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -14,13 +14,13 @@ "contract/valory/transfer_nft_condition/0.1.0": "bafybeihnict3irtvnyxtkwyg6wphe44wz3dogijiha45xrkcrh5ktq2lsi", "contract/valory/relayer/0.1.0": "bafybeiaabvxim4blp5fxb6qjlzjivtvkme3fk24h5jte7w6vr6rsx72j6u", "skill/valory/market_manager_abci/0.1.0": "bafybeicbvxvjkoksbknujaid5hx7krjlgm6barcjcwo33tdccanrcp674a", - "skill/valory/decision_maker_abci/0.1.0": "bafybeigyfuqqrnjfg4wk67qfgqnacdolissfdheqprfoeij2si3dcmicki", - "skill/valory/trader_abci/0.1.0": "bafybeigv26l3ejntxpxs5u74da2sc6ktyigqxa6cormhdzadld5swyp7ru", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibaswnwa6a3td237bfxefdw3zxoujj2jl2dbyswmyeg6affaultou", + "skill/valory/decision_maker_abci/0.1.0": "bafybeid7pv3u6dul7s2muozhtiuqnkoom6eheiyzkxge3nev4ug4u5qr3m", + "skill/valory/trader_abci/0.1.0": "bafybeifw4xl5oeqsxs5xealvrkm5umrzfvalpu32szg4tcagf22vnhdmsq", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeieheiirt7i7ujivglkm65xu7lfbr32h4epxzty7ar7e4gd2zjbj34", "skill/valory/staking_abci/0.1.0": "bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeickfeuqlpmryegnfvfu2duk2v4ycowwloohu3xxrafd5md6xl5swi", - "agent/valory/trader/0.1.0": "bafybeiexxyiovtomn7etpzfasps62wdyfmn65ltxqm23hdrsnj5gdv4z3e", - "service/valory/trader/0.1.0": "bafybeielvnzdmhmsdfs3mti3q6obpra3oaacxaby2ir7yiinvjuzyzinnq" + "agent/valory/trader/0.1.0": "bafybeieu45k53db2eklmhqeguyca6qsf4zuluwo2ul5fl2unzerojhvqlq", + "service/valory/trader/0.1.0": "bafybeigg5xsrq2xyt2j2dhun64ldwb7m4nl6yeib5fvm6y7wrxeya3254a" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 52f49d7f5..9378b12d4 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibaswnwa6a3td237bfxefdw3zxoujj2jl2dbyswmyeg6affaultou +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieheiirt7i7ujivglkm65xu7lfbr32h4epxzty7ar7e4gd2zjbj34 - valory/market_manager_abci:0.1.0:bafybeicbvxvjkoksbknujaid5hx7krjlgm6barcjcwo33tdccanrcp674a -- valory/decision_maker_abci:0.1.0:bafybeigyfuqqrnjfg4wk67qfgqnacdolissfdheqprfoeij2si3dcmicki -- valory/trader_abci:0.1.0:bafybeigv26l3ejntxpxs5u74da2sc6ktyigqxa6cormhdzadld5swyp7ru +- valory/decision_maker_abci:0.1.0:bafybeid7pv3u6dul7s2muozhtiuqnkoom6eheiyzkxge3nev4ug4u5qr3m +- valory/trader_abci:0.1.0:bafybeifw4xl5oeqsxs5xealvrkm5umrzfvalpu32szg4tcagf22vnhdmsq - valory/staking_abci:0.1.0:bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4 - valory/check_stop_trading_abci:0.1.0:bafybeickfeuqlpmryegnfvfu2duk2v4ycowwloohu3xxrafd5md6xl5swi - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 16cc14efb..57c901020 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeiexxyiovtomn7etpzfasps62wdyfmn65ltxqm23hdrsnj5gdv4z3e +agent: valory/trader:0.1.0:bafybeieu45k53db2eklmhqeguyca6qsf4zuluwo2ul5fl2unzerojhvqlq number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index ab7c61bb7..3db4b6cf9 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -25,7 +25,7 @@ fingerprint: behaviours/reedem.py: bafybeid7nsgrqm25hw2nugmzlb6xfzvnsvyy3fonn7hxcudot7htqew4ca behaviours/round_behaviour.py: bafybeibvhobpvzzd37ecleuyp2jrbed6nontcw7urtsilbbzvqsmmupx64 behaviours/sampling.py: bafybeibtkli72qsvotkrsepkgpiumtr5sershtkpb427oygnszs3dpgxry - behaviours/tool_selection.py: bafybeic7cowzgbai3d4d6k5grhl4qz4or5nnwgrlccmmdv6u5njtfvswgi + behaviours/tool_selection.py: bafybeieq54ygbp5ks6d5zsnab45qkkl6ark5hvdkz66ol3px5nxtmhxrte dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm fsm_specification.yaml: bafybeif2kas4eho4aielucf3ihjzjsog32icccbxrvje6kkw7aw4m4zg6q handlers.py: bafybeielhwnfm2blt6clmwr557g2g3gddnt5bpb4cqul6p3wiwsfoksvlu diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 6fb1e19f8..b4dc0fb49 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -25,8 +25,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq - valory/market_manager_abci:0.1.0:bafybeicbvxvjkoksbknujaid5hx7krjlgm6barcjcwo33tdccanrcp674a -- valory/decision_maker_abci:0.1.0:bafybeigyfuqqrnjfg4wk67qfgqnacdolissfdheqprfoeij2si3dcmicki -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibaswnwa6a3td237bfxefdw3zxoujj2jl2dbyswmyeg6affaultou +- valory/decision_maker_abci:0.1.0:bafybeid7pv3u6dul7s2muozhtiuqnkoom6eheiyzkxge3nev4ug4u5qr3m +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieheiirt7i7ujivglkm65xu7lfbr32h4epxzty7ar7e4gd2zjbj34 - valory/staking_abci:0.1.0:bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4 - valory/check_stop_trading_abci:0.1.0:bafybeickfeuqlpmryegnfvfu2duk2v4ycowwloohu3xxrafd5md6xl5swi - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index fdc0223e4..5c09db24c 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -21,7 +21,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/decision_maker_abci:0.1.0:bafybeigyfuqqrnjfg4wk67qfgqnacdolissfdheqprfoeij2si3dcmicki +- valory/decision_maker_abci:0.1.0:bafybeid7pv3u6dul7s2muozhtiuqnkoom6eheiyzkxge3nev4ug4u5qr3m - valory/staking_abci:0.1.0:bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4 - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: