diff --git a/packages/packages.json b/packages/packages.json index 4aad08943..50d584ed9 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeigwsffbzx62d3ikz5kyjsewcvknrrnq3bcqgktnbrcpz4g6lyu3eq", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeicia7itulcrxlwbmhfzxppgo5i33tb2nmcycwizftw7gps4dareka", - "skill/valory/decision_maker_abci/0.1.0": "bafybeidcnpwi4o7z4wsenxz7tklagdchqunvmdqeyplcybwkoywmb7tvlu", - "skill/valory/trader_abci/0.1.0": "bafybeictsdzjcfvfc2exc5jn4xvkowr24flw65blrgb5uj4jzcdwr7kgpi", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicdzirkebpbyhhkhordyte3gup32yt4nyfpijqihtpmceryrr5o74", + "skill/valory/decision_maker_abci/0.1.0": "bafybeiaiqddhwawt7u6stg6ujmzmnn3my7dtqa7tur5jbjfswnsasfoila", + "skill/valory/trader_abci/0.1.0": "bafybeidq5fxitj26rcy37pyrksoyks65zusndh6sor6ct5qv26kz3eupl4", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeidw5cedygh25jtxdv35zb4223kbhtwv6enfxtkkdkuhuayvply5gq", "skill/valory/staking_abci/0.1.0": "bafybeifyqszbiccxwwfldrl6lz5dspuaxbqd5qnniyecusddwvxpfwiyr4", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeicsrrxjs6bup267jiek3r7eutd42ssfyjthyvxfku6qozw3xebxta", - "agent/valory/trader/0.1.0": "bafybeihylp5xyzdngcfme3flt2kl6k66s7u4pvb7lsv27mbgotve4y57rq", - "service/valory/trader/0.1.0": "bafybeig2qzh3alfvlwlxuek6235ujplhvtysnfkeq4iu7y6x6lptt7376i", - "service/valory/trader_pearl/0.1.0": "bafybeig4um4w3d4hxz4luwiezdqveuvjm7jgn3axwysrik2xdw2b3rjpta" + "agent/valory/trader/0.1.0": "bafybeief2fkdv5pvryo6kyzguqhyfrvsxvb2sqnt4ptriairagjvuonttq", + "service/valory/trader/0.1.0": "bafybeig4b4v62lkebjacfstiizb3cr6ir6vtj6qhrfcpvry7vltikyqyyq", + "service/valory/trader_pearl/0.1.0": "bafybeicioq4b7o7ajmwigl66lvy2yiaprdagmrvz34awq55nxsoupr6ooe" }, "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 757a1ca5d..b17ec0e2a 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:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicdzirkebpbyhhkhordyte3gup32yt4nyfpijqihtpmceryrr5o74 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidw5cedygh25jtxdv35zb4223kbhtwv6enfxtkkdkuhuayvply5gq - valory/market_manager_abci:0.1.0:bafybeicia7itulcrxlwbmhfzxppgo5i33tb2nmcycwizftw7gps4dareka -- valory/decision_maker_abci:0.1.0:bafybeidcnpwi4o7z4wsenxz7tklagdchqunvmdqeyplcybwkoywmb7tvlu -- valory/trader_abci:0.1.0:bafybeictsdzjcfvfc2exc5jn4xvkowr24flw65blrgb5uj4jzcdwr7kgpi +- valory/decision_maker_abci:0.1.0:bafybeiaiqddhwawt7u6stg6ujmzmnn3my7dtqa7tur5jbjfswnsasfoila +- valory/trader_abci:0.1.0:bafybeidq5fxitj26rcy37pyrksoyks65zusndh6sor6ct5qv26kz3eupl4 - valory/staking_abci:0.1.0:bafybeifyqszbiccxwwfldrl6lz5dspuaxbqd5qnniyecusddwvxpfwiyr4 - valory/check_stop_trading_abci:0.1.0:bafybeicsrrxjs6bup267jiek3r7eutd42ssfyjthyvxfku6qozw3xebxta - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 73eea9ea8..c0bf011d9 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:bafybeihylp5xyzdngcfme3flt2kl6k66s7u4pvb7lsv27mbgotve4y57rq +agent: valory/trader:0.1.0:bafybeief2fkdv5pvryo6kyzguqhyfrvsxvb2sqnt4ptriairagjvuonttq number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 6eb5abb86..fb5b64536 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeihylp5xyzdngcfme3flt2kl6k66s7u4pvb7lsv27mbgotve4y57rq +agent: valory/trader:0.1.0:bafybeief2fkdv5pvryo6kyzguqhyfrvsxvb2sqnt4ptriairagjvuonttq number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/behaviours/storage_manager.py b/packages/valory/skills/decision_maker_abci/behaviours/storage_manager.py index f22cae313..04e5ba0e9 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/storage_manager.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/storage_manager.py @@ -267,7 +267,7 @@ def _fetch_accuracy_info(self) -> Generator[None, None, bool]: return True - def _update_accuracy_store(self, local_tools: List[str]) -> None: + def _update_accuracy_store(self) -> None: """Update the accuracy store file with the latest information available""" self.context.logger.info("Updating accuracy information of the policy...") sep = self.acc_info_fields.sep @@ -276,9 +276,17 @@ def _update_accuracy_store(self, local_tools: List[str]) -> None: ) accuracy_store = self.policy.accuracy_store + # remove tools which are irrelevant + for tool in accuracy_store.copy(): + if tool not in self.mech_tools: + accuracy_store.pop(tool, None) + # update the accuracy store using the latest accuracy information (only entered during the first period) for row in reader: tool = row[self.acc_info_fields.tool] + if tool not in accuracy_store.keys(): + continue + # overwrite local with global information (naturally, no global information is available for pending) accuracy_store[tool] = AccuracyInfo( int(row[self.acc_info_fields.requests]), @@ -288,7 +296,7 @@ def _update_accuracy_store(self, local_tools: List[str]) -> None: ) # update the accuracy store by adding tools which we do not have any global information about yet - for tool in local_tools: + for tool in self.mech_tools: accuracy_store.setdefault(tool, AccuracyInfo()) self.policy.update_weighted_accuracy() @@ -298,21 +306,17 @@ def _set_policy(self) -> Generator: if self.is_first_period or not self.synchronized_data.is_policy_set: self.context.logger.debug("Setting initial policy") self._policy = self._get_init_policy() - local_tools = self._try_recover_mech_tools() - if local_tools is None: - local_tools = self.mech_tools else: self.context.logger.debug( "Reading policy information from synchronized data" ) self._policy = self.synchronized_data.policy - local_tools = self.synchronized_data.available_mech_tools if self.is_first_period: yield from self.wait_for_condition_with_sleep( self._fetch_accuracy_info, sleep_time_override=self.params.sleep_time ) - self._update_accuracy_store(local_tools) + self._update_accuracy_store() def _try_recover_utilized_tools(self) -> Dict[str, str]: """Try to recover the utilized tools from the tools store.""" diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 4a5ba404a..53e5113c5 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: bafybeiaxwp4lx62owcaqfp6xcqh6567f5yvwnl4rage2f5hmq4nltkzjjy behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i behaviours/sampling.py: bafybeiekxzublnsvgjb2y2uvtye4zkethvmsxh4itonnwmb3sbviyyhsgq - behaviours/storage_manager.py: bafybeibnlg2eirzcxdpnuwbhzne77ear44cqwm4yae5bacgfu4vqqq7d7a + behaviours/storage_manager.py: bafybeif7mrnmhrarndx225e26jseuieosdja4jnlewnv2mtxqdydevxuze behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm fsm_specification.yaml: bafybeiabt2fonv63hozgr7bt4d5auom76iufzh6etpnmbwekktckz7644a diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 749294b6c..24666df2c 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeicia7itulcrxlwbmhfzxppgo5i33tb2nmcycwizftw7gps4dareka -- valory/decision_maker_abci:0.1.0:bafybeidcnpwi4o7z4wsenxz7tklagdchqunvmdqeyplcybwkoywmb7tvlu -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicdzirkebpbyhhkhordyte3gup32yt4nyfpijqihtpmceryrr5o74 +- valory/decision_maker_abci:0.1.0:bafybeiaiqddhwawt7u6stg6ujmzmnn3my7dtqa7tur5jbjfswnsasfoila +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidw5cedygh25jtxdv35zb4223kbhtwv6enfxtkkdkuhuayvply5gq - valory/staking_abci:0.1.0:bafybeifyqszbiccxwwfldrl6lz5dspuaxbqd5qnniyecusddwvxpfwiyr4 - valory/check_stop_trading_abci:0.1.0:bafybeicsrrxjs6bup267jiek3r7eutd42ssfyjthyvxfku6qozw3xebxta - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 7360f0e0b..f02c6c7e8 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeidcnpwi4o7z4wsenxz7tklagdchqunvmdqeyplcybwkoywmb7tvlu +- valory/decision_maker_abci:0.1.0:bafybeiaiqddhwawt7u6stg6ujmzmnn3my7dtqa7tur5jbjfswnsasfoila - valory/staking_abci:0.1.0:bafybeifyqszbiccxwwfldrl6lz5dspuaxbqd5qnniyecusddwvxpfwiyr4 - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: