Remove SPADE dependency #29
Reference in New Issue
Block a user
Delete Branch "refactor/remove-spade"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refactored the agent structure of the code base to not depend on SPADE anymore. This has lead to a massive speedup in communication speed between agents, see: https://utrechtuniversity.youtrack.cloud/articles/N25B-A-25/Speed-improvements.
To verify this merge request, first make sure that all the standard checks apply:
Since the changes are quite big, it is also necessary that all code is understandable, so that future development won't struggle trying to understand what is happening. For this, make sure the following checks apply:
CyclicBehaviour, for example)ref: N25B-300
changed the description
marked the checklist item Code follows style guide as completed
marked the checklist item All tests pass as completed
marked the checklist item End-to-end functionality is intact as completed
marked the checklist item It is clear how to create a new agent with functionality, i.e.: as completed
marked the checklist item It is clear how to create a new agent with functionality, i.e.: as incomplete
marked the checklist item Communicating between agents as completed
marked the checklist item Adding new behavior to an agent (what was previously a
CyclicBehaviour, for example) as completedmarked the checklist item It is clear how to create a new agent with functionality, i.e.: as completed
marked the checklist item Documentation and comments are present where needed as completed
should Handle message maybe be an abstract method since every agent must be able to recieve messages. or the process inbox one. Just one of the two maybe?
Add_background_task, docstring kinda vague, also coro type is Any.
Maybe explain a bit better how a behavoir should look like. (and refer to proper examples like the VAD or RI-Com, which both use it.
Also maybe just call it add_behavior/add_behavior_task
left review comments
https://utrechtuniversity.youtrack.cloud/articles/N25B-A-25/Speed-improvements.
Dit document is kinda dookie ngl.
Ik zou aanraden het in een tabel te zetten. (gpt doet het zo)
Ook is de log echt pauper lang. als het over de startup speed gaat kun je het beter wat inkorten.
Voor de rest ziet het er echt Minty uit tho!!
Alles werkt zoals verwacht en de tests cases zijn extensive. (had zelfs llm agent gedaan die niet eens bestond)
I thought about making
handle_message()abstract, but in fact not every agent receives messages. For example, theVADAgentdoesn't. As far as_process_inbox()goes, it should not be overridden by subclasses.Ja eens, gaan we wel fixen voor het verslag
changed this line in version 2 of the diff
added 1 commit
1f9926fe- chore: apply suggestionCompare with previous version
requested review from @8464960
:func
add_background_task-> :funcadd_behaviorIs this a configurable constant? If so, move it to the config file
same comment question about config here
Same comment/question about constants here
Overall really nice job. I went over the code and I think it made the code easier to understand and implement!
I only had some very minor comments
left review comments
Actually it shouldn't even be there, must have creeped back in with a revert
This is not my code so not 100% sure, but I think this is the same 1 second as one of the other constants that is already in the config file
@0950726 is this a "magic number"?
Can be solved by using some sort of signal that can be awaited. Then it'll unblock immediately as well
Logs gaan niet om de startup speed. Het gaat om de 11 spraak detecties die tot het einde van de logs gaan. Wel kunnen sommige typen log berichten weggelaten worden. Weet sowieso niet of we de berekeningen willen reporten, uiteindelijk zijn alleen de resultaten relevant.
I feel like that would just move the loop to somewhere else, or is there an elegant way of not having to loop then?
Nevermind, it seems like an
asyncio.Eventcan help herechanged this line in version 3 of the diff
changed this line in version 3 of the diff
added 1 commit
4d076eac- perf: improved speed of BDICompare with previous version
I completely revamped this section of the BDI with the latest commit, overall performance is now much better and no more magic number :)
changed this line in version 4 of the diff
changed this line in version 4 of the diff
added 1 commit
8607f9b6- chore: apply suggestionsCompare with previous version
added 1 commit
47a20413- chore: fix testsCompare with previous version
added 1 commit
ef00c03e- feat: pydantic models and inter-process messagingCompare with previous version
approved this merge request
approved this merge request
test_agent_systems.py - test_agent_lifecycle. Faalt op het moment
left review comments
Ik heb op dit moment heel even geen tijd, maar als je in de branch
docs-cbkijkt, daar is de test gefixt. Je zou dat bestand even kunnen kopieren, volgens mij zijn het twee veranderingenNevermind, dat klopt niet. Het is een race condition volgens mij, afhankelijk van hoe snel je computer is :/
Je zou het kunnen fixen door de
asyncio.sleep(0.02)op regel 42 te veranderen naar 0.1 seconde, dan zou die het moeten doen. Wel een beetje rare fix natuurlijkJa soms haalt ie hem wel en soms niet.
Met sleep op (0.1) tot nu toe altijd.
Mss idee om er straks een warning van te maken?
atm niet een groot probleem tho.
resolved all threads
Kan met een:
Hierna gewoon de
assert == 2houden, dan is de functionaliteit hetzelfde.added 1 commit
e5949a72- fix: fix test race conditionCompare with previous version
It has been fixed!
resolved all threads
mentioned in commit
435f0c25a9