Closed DavidMinarsch closed 2 years ago
@0xArdi currently
tox -e check-abciapp-specs
fails withautonomy.analyse.abci.app_spec.DFASpecificationError: <class 'packages.elcollectooorr.skills.elcollectooorr_abci.rounds.ElcollectooorrBaseAbciApp'> ABCI App has the following issues: - DecisionRound: transition function events {'DECIDED_NO', 'DECIDED_YES', 'NO_MAJORITY', 'GIB_DETAILS'} do not match referenced events {'DECIDED_NO', 'DECIDED_YES', 'NO_MAJORITY'}.
Since you understand the code better I suggest you decide if it is safe to remove this event. Otherwise, speak to @jmoreira-valory about resolution.
@DavidMinarsch the FSM in the yaml files is outdated.
@0xArdi currently
tox -e check-abciapp-specs
fails withautonomy.analyse.abci.app_spec.DFASpecificationError: <class 'packages.elcollectooorr.skills.elcollectooorr_abci.rounds.ElcollectooorrBaseAbciApp'> ABCI App has the following issues: - DecisionRound: transition function events {'DECIDED_NO', 'DECIDED_YES', 'NO_MAJORITY', 'GIB_DETAILS'} do not match referenced events {'DECIDED_NO', 'DECIDED_YES', 'NO_MAJORITY'}.
Since you understand the code better I suggest you decide if it is safe to remove this event. Otherwise, speak to @jmoreira-valory about resolution.
@DavidMinarsch the FSM in the yaml files is outdated.
Yes, although make fix-abci-app-specs
yields:
autonomy analyse abci generate-app-specs packages.elcollectooorr.skills.elcollectooorr_abci.rounds.ElcollectooorrBaseAbciApp packages/elcollectooorr/skills/elcollectooorr_abci/fsm_specification.yaml || (echo "Failed to check elcollectooorr abci consistency" && exit 1)
Error: Failed to load "packages.elcollectooorr.skills.elcollectooorr_abci.rounds". Please, verify that AbciApps and classes are correctly defined within the module.
Failed to check elcollectooorr abci consistency
@jmoreira-valory might be able to shed some light
I am getting the same error as you, but I also see:
ModuleNotFoundError: No module named 'packages'
There are 2 problems discussed in this thread:
autonomy.analyse.abci.app_spec.DFASpecificationError: <class 'packages.elcollectooorr.skills.elcollectooorr_abci.rounds.ElcollectooorrBaseAbciApp'> ABCI App has the following issues: - DecisionRound: transition function events {'DECIDED_NO', 'DECIDED_YES', 'NO_MAJORITY', 'GIB_DETAILS'} do not match referenced events {'DECIDED_NO', 'DECIDED_YES', 'NO_MAJORITY'}.
This problem occurs when checking unreferenced events in the transition function of the AbciApp. That is, we are indicating a transition (RoundA, EVENT) --> RoundB, but RoundA (nor its superclasses) never produces EVENT. This check does not use the fsm_specification.yaml file.
The ElcollectooorrBaseAbciApp
defines the following transition under DecisionRound
:
https://github.com/valory-xyz/agent-academy-1/blob/c92fc51eb372c7c825bfe11b7cf429c9688dc462/packages/elcollectooorr/skills/elcollectooorr_abci/rounds.py#L510
However, upon examining the class https://github.com/valory-xyz/agent-academy-1/blob/c92fc51eb372c7c825bfe11b7cf429c9688dc462/packages/elcollectooorr/skills/elcollectooorr_abci/rounds.py#L409 it can be seen that neither DecisionRound
nor its superclasses launch the event GIB_DETAILS
, reason why the script is complaining.
Solution: either (1) Remove this non-existent transition from the ElcollectooorrBaseAbciApp
, or (2) Return GIB_DETAILS
at some part inside DecisionRound
(I am not familiar with the business logic of the application, so I can't say which is better...)
Yes, although
make fix-abci-app-specs
yields:autonomy analyse abci generate-app-specs packages.elcollectooorr.skills.elcollectooorr_abci.rounds.ElcollectooorrBaseAbciApp packages/elcollectooorr/skills/elcollectooorr_abci/fsm_specification.yaml || (echo "Failed to check elcollectooorr abci consistency" && exit 1) Error: Failed to load "packages.elcollectooorr.skills.elcollectooorr_abci.rounds". Please, verify that AbciApps and classes are correctly defined within the module. Failed to check elcollectooorr abci consistency
This is caused because .../agent-academy-1
folder is not in the Python path. To see this, try:
import sys
for path in sys.path:
print(path)
Solution: export PYTHONPATH=${PYTHONPATH}:${PWD}
However, this will NOT solve Problem 1 above. The reason is that this command will read the AbciApp
as defined in the .py file, and produce a .yaml specification file that matches that implementation. That is, it will generate an fsm_specification.yaml
file containing the GIB_DETAILS
event.
fix-abci-app-specs
fixes the .yaml file, but if the AbciApp
is incorrectly defined, it won't fix it.
GIB_DETAILS
(either remove it from the transition function or return it from the corresponding round).fsm_specification.yaml
file.Thanks a lot @jmoreira-valory , the issue discussed above is resolved in #129 .
There is another issue when trying to generate the abci app spec for the composed abci app.
autonomy analyse abci generate-app-specs packages.elcollectooorr.skills.elcollectooorr_abci.rounds.ElcollectooorrAbciApp packages/elcollectooorr/skills/elcollectooorr_abci/fsm_composition_specification.yaml || (echo "Failed to check chained abci consistency" && exit 1)
Produces:
Error: Class "ElcollectooorrAbciApp" is not in "packages.elcollectooorr.skills.elcollectooorr_abci.rounds".
ElcollectooorrAbciApp
I think the problem is caused by you having the composition in the same file as the to be composed fsm. We don't recommend that - although its perfectly fine to do - and apparently right now the tool does not support it. I think it fails because there are multiple AbciApp
s present. @jmoreira-valory we should fix that on the tool
ElcollectooorrAbciApp
I think the problem is caused by you having the composition in the same file as the to be composed fsm. We don't recommend that - although its perfectly fine to do - and apparently right now the tool does not support it. I think it fails because there are multiple
AbciApp
s present. @jmoreira-valory we should fix that on the tool
I was wrong, it was a good old Python path issue coupled with the error being totally uninformative here: https://github.com/valory-xyz/open-autonomy/blob/v0.2.0/autonomy/cli/analyse.py#L60-L65
@0xArdi currently
tox -e check-abciapp-specs
fails withSince you understand the code better I suggest you decide if it is safe to remove this event. Otherwise, speak to @jmoreira-valory about resolution.