Skip to content

Commit

Permalink
Merge pull request #86 from valory-xyz/fix/predition-tool
Browse files Browse the repository at this point in the history
Fix additional information collection on prediction tool
  • Loading branch information
angrybayblade authored Jul 12, 2023
2 parents 8ccfe44 + 0c7908c commit 5670a1e
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .example.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FILE_HASH_TO_TOOLS='[["bafybeiepacjq6yjukta4gfiq2fyvsj4b4r2g7swtkb2qfjugbbtsjt47ya",["openai-text-davinci-002","openai-text-davinci-003","openai-gpt-3.5-turbo","openai-gpt-4"]],["bafybeiepc5v4ixwuu5m6p5stck5kf2ecgkydf6crj52i5umnl2qm5swb4i",["stabilityai-stable-diffusion-v1-5","stabilityai-stable-diffusion-xl-beta-v2-2-2","stabilityai-stable-diffusion-512-v2-1","stabilityai-stable-diffusion-768-v2-1"]],["bafybeidpbnqbruzqlq424qt3i5dcvyqmcimshjilftabnrroujmjhdmteu",["transfer-native"]],["bafybeicdi6noqhbmau6qa7xwvufet5fvp42wy5yokn5uggsbvojyyzhxxu",["prediction-offline","prediction-online"]]]'
FILE_HASH_TO_TOOLS='[["bafybeiepacjq6yjukta4gfiq2fyvsj4b4r2g7swtkb2qfjugbbtsjt47ya",["openai-text-davinci-002","openai-text-davinci-003","openai-gpt-3.5-turbo","openai-gpt-4"]],["bafybeiepc5v4ixwuu5m6p5stck5kf2ecgkydf6crj52i5umnl2qm5swb4i",["stabilityai-stable-diffusion-v1-5","stabilityai-stable-diffusion-xl-beta-v2-2-2","stabilityai-stable-diffusion-512-v2-1","stabilityai-stable-diffusion-768-v2-1"]],["bafybeidpbnqbruzqlq424qt3i5dcvyqmcimshjilftabnrroujmjhdmteu",["transfer-native"]],["bafybeif3izkobmvaoen23ine6tiqx55eaf4g3r56hdalnig656xivzpf3m",["prediction-offline","prediction-online"]]]'
API_KEYS='[["openai","dummy_api_key"],["stabilityai","dummy_api_key"]]'
ETHEREUM_LEDGER_RPC_0=https://rpc.eu-central-2.gateway.fm/v4/gnosis/non-archival/mainnet
ETHEREUM_WEBSOCKET_RPC_0=wss://rpc.eu-central-2.gateway.fm/ws/v4/gnosis/non-archival/mainnet
Expand Down
8 changes: 4 additions & 4 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"dev": {
"connection/valory/websocket_client/0.1.0": "bafybeicz53kzs5uvyiod2azntl76zwgmpgr22ven4wl5fnwt2m546j3wsu",
"skill/valory/contract_subscription/0.1.0": "bafybeif3hkpgbzuoxsbqxnd752qkvk3onytltrufnyrphnqbi62si4mdhy",
"agent/valory/mech/0.1.0": "bafybeia3ja3njzgxseefhizeypzvi5epoe2467khymqywktcgwid5fljx4",
"agent/valory/mech/0.1.0": "bafybeifvlxhojvlnijphps2zed5pfp6it4uu374pigk43gabv4j33zifki",
"skill/valory/multiplexer_abci/0.1.0": "bafybeiatryharf4xsxouas7dzofcjedxa3sx3ifm5wfzf5z5hgz3jps474",
"skill/valory/task_execution_abci/0.1.0": "bafybeiagkhgyrm3lbdmiufbb6fe2iuad6yvuavk4ksiy2tiasocv445ala",
"skill/valory/mech_abci/0.1.0": "bafybeifmlpw26kjfhpb36arpm242qtriuj63fd2pxvfpsrogytowxnarwa",
"skill/valory/task_execution_abci/0.1.0": "bafybeif5mfev2oczliptbsriddyhkpksp2ifrfq5sjap434wprq3o2ev2u",
"skill/valory/mech_abci/0.1.0": "bafybeicvppgseykjmb3ar2rciwgy34hqantledr55p2denvyhtrxwp7qeu",
"contract/valory/agent_mech/0.1.0": "bafybeidrhnm7xfcbxaxyl26azjvd6ur7xkcr5pdvpbpk5tddpyma7c74xu",
"service/valory/mech/0.1.0": "bafybeifgfw7htwiitg4r6cwixeief5uezrziyrgudi2ynasgrcarzrzzua",
"service/valory/mech/0.1.0": "bafybeigvlszayc3tpfke6eicucaxqvvqrsyoghmzuqrqasw62t6usgkscm",
"protocol/valory/acn_data_share/0.1.0": "bafybeieyixetwvz767zekhvg7r6etumyanzys6xbalx2brrfswybinnlhi",
"protocol/valory/default/1.0.0": "bafybeiecmut3235aen7wxukllv424f3dysvvlgfmn562kzdunc5hdj3hxu"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/agents/mech/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ skills:
- valory/abstract_abci:0.1.0:bafybeiff2dqnkeorf343fmb3547fhiznvdw4ewbwl4rqluek2cv6ibl5hi
- valory/abstract_round_abci:0.1.0:bafybeiac62ennpw54gns2quk4g3yoaili2mb72nj6c52czobz5dcwj4mwi
- valory/contract_subscription:0.1.0:bafybeif3hkpgbzuoxsbqxnd752qkvk3onytltrufnyrphnqbi62si4mdhy
- valory/mech_abci:0.1.0:bafybeifmlpw26kjfhpb36arpm242qtriuj63fd2pxvfpsrogytowxnarwa
- valory/mech_abci:0.1.0:bafybeicvppgseykjmb3ar2rciwgy34hqantledr55p2denvyhtrxwp7qeu
- valory/multiplexer_abci:0.1.0:bafybeiatryharf4xsxouas7dzofcjedxa3sx3ifm5wfzf5z5hgz3jps474
- valory/registration_abci:0.1.0:bafybeib6fsfur5jnflcveidnaeylneybwazewufzwa5twnwovdqgwtwsxm
- valory/reset_pause_abci:0.1.0:bafybeibqz7y3i4aepuprhijwdydkcsbqjtpeea6gdzpp5fgc6abrvjz25a
- valory/task_execution_abci:0.1.0:bafybeiagkhgyrm3lbdmiufbb6fe2iuad6yvuavk4ksiy2tiasocv445ala
- valory/task_execution_abci:0.1.0:bafybeif5mfev2oczliptbsriddyhkpksp2ifrfq5sjap434wprq3o2ev2u
- valory/termination_abci:0.1.0:bafybeieb3gnvjxxsh73g67m7rivzknwb63xu4qeagpkv7f4mqz33ecikem
- valory/transaction_settlement_abci:0.1.0:bafybeihdpac4ayfgop3ixflimlb3zzyeejlpqtljfptdak6tc7aq4u5fzi
default_ledger: ethereum
Expand Down Expand Up @@ -142,7 +142,7 @@ models:
setup:
all_participants: ${list:["0x10E867Ac2Fb0Aa156ca81eF440a5cdf373bE1AaC"]}
safe_contract_address: ${str:0x5e1D1eb61E1164D5a50b28C575dA73A29595dFf7}
file_hash_to_tools_json: ${list:[["bafybeibi34bhbvesmvd6o24jxvuldrwen4wj62na3lhva7k4afkg2shinu",["openai-text-davinci-002","openai-text-davinci-003","openai-gpt-3.5-turbo","openai-gpt-4"]],["bafybeiafdm3jctiz6wwo3rmo3vdubk7j7l5tumoxi5n5rc3x452mtkgyua",["stabilityai-stable-diffusion-v1-5","stabilityai-stable-diffusion-xl-beta-v2-2-2","stabilityai-stable-diffusion-512-v2-1","stabilityai-stable-diffusion-768-v2-1"]],["bafybeidpbnqbruzqlq424qt3i5dcvyqmcimshjilftabnrroujmjhdmteu",["transfer-native"]]]}
file_hash_to_tools_json: ${list:[["bafybeibi34bhbvesmvd6o24jxvuldrwen4wj62na3lhva7k4afkg2shinu",["openai-text-davinci-002","openai-text-davinci-003","openai-gpt-3.5-turbo","openai-gpt-4"]],["bafybeiafdm3jctiz6wwo3rmo3vdubk7j7l5tumoxi5n5rc3x452mtkgyua",["stabilityai-stable-diffusion-v1-5","stabilityai-stable-diffusion-xl-beta-v2-2-2","stabilityai-stable-diffusion-512-v2-1","stabilityai-stable-diffusion-768-v2-1"]],["bafybeidpbnqbruzqlq424qt3i5dcvyqmcimshjilftabnrroujmjhdmteu",["transfer-native"]],["bafybeif3izkobmvaoen23ine6tiqx55eaf4g3r56hdalnig656xivzpf3m",["prediction-online","prediction-offline"]]]}
api_keys_json: ${list:[["openai", "dummy_api_key"],["stabilityai", "dummy_api_key"]]}
use_polling: ${bool:false}
polling_interval: ${int:25}
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/mech/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba
fingerprint_ignore_patterns: []
agent: valory/mech:0.1.0:bafybeia3ja3njzgxseefhizeypzvi5epoe2467khymqywktcgwid5fljx4
agent: valory/mech:0.1.0:bafybeifvlxhojvlnijphps2zed5pfp6it4uu374pigk43gabv4j33zifki
number_of_agents: 4
deployment:
agent:
Expand Down
3 changes: 2 additions & 1 deletion packages/valory/skills/mech_abci/fsm_specification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ alphabet_in:
- RESET_AND_PAUSE_TIMEOUT
- RESET_TIMEOUT
- ROUND_TIMEOUT
- TASK_EXECUTION_ROUND_TIMEOUT
- SUSPICIOUS_ACTIVITY
- VALIDATE_TIMEOUT
- WAIT
Expand Down Expand Up @@ -101,7 +102,7 @@ transition_func:
(SynchronizeLateMessagesRound, SUSPICIOUS_ACTIVITY): TaskExecutionRound
(TaskExecutionRound, DONE): RandomnessTransactionSubmissionRound
(TaskExecutionRound, ERROR): MultiplexerRound
(TaskExecutionRound, ROUND_TIMEOUT): TaskExecutionRound
(TaskExecutionRound, TASK_EXECUTION_ROUND_TIMEOUT): TaskExecutionRound
(ValidateTransactionRound, DONE): MultiplexerRound
(ValidateTransactionRound, NEGATIVE): CheckTransactionHistoryRound
(ValidateTransactionRound, NONE): SelectKeeperTransactionSubmissionBRound
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/mech_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fingerprint:
behaviours.py: bafybeihgtg4l7qcu33ptyfn6cnohm3tcxlpkdqijyc5zjxmci6lqzxmogy
composition.py: bafybeiektjao3czojlipbcj2oglrk4hsch76d7ft3zw3vpcerewvvi6idy
dialogues.py: bafybeidhmgdnhxcgv35vahz3ycoiduug23kfyqvttqnywjp3eiuqal4bzy
fsm_specification.yaml: bafybeieeqdr76xgxqjdqalip7agguutwsn23n5xgop4ziach7l4hiqxvqm
fsm_specification.yaml: bafybeic4fbqrftemdseokvfiwwo7cyajloz2aapvzmqbubulc7r34wcpzm
handlers.py: bafybeiffuduhg433qsu6lbet5jsaub63bzv2l4x756aj2fbnu5bnfu4ble
models.py: bafybeic3miniq5lacarxspyxuvmlnwervwf2wmpnvw2gxpgk77fzyzcpvq
fingerprint_ignore_patterns: []
Expand All @@ -22,7 +22,7 @@ skills:
- valory/multiplexer_abci:0.1.0:bafybeiatryharf4xsxouas7dzofcjedxa3sx3ifm5wfzf5z5hgz3jps474
- valory/registration_abci:0.1.0:bafybeib6fsfur5jnflcveidnaeylneybwazewufzwa5twnwovdqgwtwsxm
- valory/reset_pause_abci:0.1.0:bafybeibqz7y3i4aepuprhijwdydkcsbqjtpeea6gdzpp5fgc6abrvjz25a
- valory/task_execution_abci:0.1.0:bafybeiagkhgyrm3lbdmiufbb6fe2iuad6yvuavk4ksiy2tiasocv445ala
- valory/task_execution_abci:0.1.0:bafybeif5mfev2oczliptbsriddyhkpksp2ifrfq5sjap434wprq3o2ev2u
- valory/termination_abci:0.1.0:bafybeieb3gnvjxxsh73g67m7rivzknwb63xu4qeagpkv7f4mqz33ecikem
- valory/transaction_settlement_abci:0.1.0:bafybeihdpac4ayfgop3ixflimlb3zzyeejlpqtljfptdak6tc7aq4u5fzi
behaviours:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
alphabet_in:
- DONE
- ERROR
- ROUND_TIMEOUT
- TASK_EXECUTION_ROUND_TIMEOUT
default_start_state: TaskExecutionRound
final_states:
- FinishedTaskExecutionRound
Expand All @@ -16,4 +16,4 @@ states:
transition_func:
(TaskExecutionRound, DONE): FinishedTaskExecutionRound
(TaskExecutionRound, ERROR): FinishedTaskExecutionWithErrorRound
(TaskExecutionRound, ROUND_TIMEOUT): TaskExecutionRound
(TaskExecutionRound, TASK_EXECUTION_ROUND_TIMEOUT): TaskExecutionRound
9 changes: 5 additions & 4 deletions packages/valory/skills/task_execution_abci/rounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
class Event(Enum):
"""TaskExecutionAbciApp Events"""

TASK_EXECUTION_ROUND_TIMEOUT = "task_execution_round_timeout"
ROUND_TIMEOUT = "round_timeout"
NO_MAJORITY = "no_majority"
DONE = "done"
Expand Down Expand Up @@ -117,23 +118,23 @@ class TaskExecutionAbciApp(AbciApp[Event]):
Transition states:
0. TaskExecutionRound
- done: 1.
- round timeout: 0.
- task execution round timeout: 0.
- error: 2.
1. FinishedTaskExecutionRound
2. FinishedTaskExecutionWithErrorRound
Final states: {FinishedTaskExecutionRound, FinishedTaskExecutionWithErrorRound}
Timeouts:
round timeout: 30.0
task execution round timeout: 60.0
"""

initial_round_cls: AppState = TaskExecutionRound
initial_states: Set[AppState] = {TaskExecutionRound}
transition_function: AbciAppTransitionFunction = {
TaskExecutionRound: {
Event.DONE: FinishedTaskExecutionRound,
Event.ROUND_TIMEOUT: TaskExecutionRound,
Event.TASK_EXECUTION_ROUND_TIMEOUT: TaskExecutionRound,
Event.ERROR: FinishedTaskExecutionWithErrorRound,
},
FinishedTaskExecutionRound: {},
Expand All @@ -144,7 +145,7 @@ class TaskExecutionAbciApp(AbciApp[Event]):
FinishedTaskExecutionWithErrorRound,
}
event_to_timeout: EventToTimeout = {
Event.ROUND_TIMEOUT: 30.0,
Event.TASK_EXECUTION_ROUND_TIMEOUT: 60.0,
}
cross_period_persisted_keys: FrozenSet[str] = frozenset()
db_pre_conditions: Dict[AppState, Set[str]] = {
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/task_execution_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ fingerprint:
__init__.py: bafybeihrkpey6kxur2uoimrskq2wfpelqidxeapdxie6iuv2x7dk77ksvu
behaviours.py: bafybeiejpjkjvyvowefa32tuxzwtm2cazlgq33uiv6xzhjtkpo4rwumkde
dialogues.py: bafybeibmac3m5u5h6ucoyjr4dazay72dyga656wvjl6z6saapluvjo54ne
fsm_specification.yaml: bafybeiggzywf6zpq2mb4ite6ptnb2zqcjjdhyu7jyb5npn7id4hcrm5tiy
fsm_specification.yaml: bafybeia66ok2ll4kjbbmgbocjfape6u6ctacgexrnpgmru6zudr5em7vty
handlers.py: bafybeibe5n7my2vd2wlwo73sbma65epjqc7kxgtittewlylcmvnmoxtxzq
io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq
io_/naive_loader.py: bafybeihqrt34jso7dwfcedh7itmmovfv55tdjhw2tkqifsbiohetbonynu
models.py: bafybeihavofxq3nxt46x74idm2mjl5xxghoqzjtuxnx5i255k6mdwsyyaq
payloads.py: bafybeigptsnusjowmqjcxnzc4ct7n2iczuiorlwqsg7dl6ipnwkjb6iqoe
rounds.py: bafybeig6gdswlwfpfvpnacpcy7vp7rt4y6cwxlmkl24wzyt4xhnd2z4zkq
rounds.py: bafybeifaza7nzpn7fv6xuk6pcamxne3b5tzqogricjkcvbek5cso2emcnm
tasks.py: bafybeicu5t5cvfhbndgpxbbtmp4vbmtyb6fba6vsnlewftvuderxp5lwcy
fingerprint_ignore_patterns: []
connections:
Expand Down
Loading

0 comments on commit 5670a1e

Please sign in to comment.