-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement experimental DataCollector API v3 #2199
base: main
Are you sure you want to change the base?
Conversation
For example, see projectmesa/mesa-examples#151. |
Performance benchmarks:
|
if group is self.model: | ||
return reporter(group) | ||
if isinstance(reporter, str): | ||
if hasattr(group, "get"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be replaced with isinstance(group, AgentSet)
or isinstance of Group
.
Thanks for this effort! It doesn’t look too bad, could you give some example usages of more complicated usage scenarios? |
Which example do you want me to port? Is wolf-sheep (agents by type) sufficient? |
I don't need a full model port, I would like some (more complex) API usage examples. Something in the form of: |
@EwoutH this should be a sufficient illustration: projectmesa/mesa-examples#158. It has agents by type. |
Given that the fall semester is starting soon, there is not enough time to build a comprehensive new data collection API. So this is what I have cooked this afternoon.
It addresses #1944 (comment):
to_df
in this PR, and this feature is actually used in visualizationand #1944 (comment):
to_df
TODO: