Make create_meta_agent deterministic#3183
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Since dicts are ordered in modern Python, can we just use dict keys? I don’t know if there are any performance implications here. |
Which is exactly what I did :) |
|
@quaquel Thanks for crushing on this to fix the issue. Generally speaking, the difference between |
|
No, |
Hmmm I still thing there is still a bug in meta-agents/ the logic needs to be more transparent. This is currently not how it is written and was not touched by this PR. My goal with this is to write down my understanding until i/someone else has time to address. Document for the group. User goal - remove agent from meta-agent but keep it in the model:
|
This is a simple bug fix to ensure deterministic behavior of
create_meta_agent. Instead of a set, we use a dict which is ordered, to ensure we have only unique agents. We do the same inside path_1 to also make this deterministic. Finally, we remove the call tomodel.register_agentinadd_constituting_agents.I am not sure about
remove_constituting_agents, this does a deregister call, but I am fairly sure this should be agent.remove((). @tpike3, can you clarify?Closes #3182 and #3184