-
Notifications
You must be signed in to change notification settings - Fork 942
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
Revert changes of #1478 and #1456 #1516
Conversation
Codecov ReportBase: 91.20% // Head: 91.26% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1516 +/- ##
==========================================
+ Coverage 91.20% 91.26% +0.05%
==========================================
Files 15 15
Lines 1308 1305 -3
Branches 225 225
==========================================
- Hits 1193 1191 -2
+ Misses 81 80 -1
Partials 34 34
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
c9ea7e1
to
4a97be7
Compare
These PRs are reverted because they introduce the bug discussed in projectmesa#1515
4a97be7
to
f0f8d68
Compare
Thanks for the work. Would be awesome if we would have a test case for this, esp. the removing-while-running part. Do you think you could add those as well? No worries if you don't have time for that, we don't have them now so this is not a requirement for this PR to be merged |
Will do that, but right now I can't unfortunately |
if self.shuffle: | ||
agent_keys = list(agent_keys) | ||
self.model.random.shuffle(agent_keys) | ||
for stage in self.stage_list: | ||
for agent_key in agent_keys: | ||
getattr(self._agents[agent_key], stage)() # Run stage | ||
# We recompute the keys because some agents might have been removed | ||
# in the previous loop. |
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.
Needs to document why the casting to list
is necessary.
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.
done
LGTM |
Reverts #1478 and parts of #1456 because they introduce the bug discussed in #1515