-
Notifications
You must be signed in to change notification settings - Fork 988
Make RandomActivationByType.agents_by_type backward compatible #1965
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Thanks for this. Can we add an optional keyword argument named something like Or should users migrate to (in general, when deprecating something a replacement should be available) |
It's a property so it behaves like an attribute from the outside (as in 2.1.5). The actual data is available via |
Adding that information to the warning sounds good! |
Thanks a lot @quaquel ! I approved the PR, but noticed that we have the same Problem for |
I'll fix it here as soon as possible (have some meetings coming up) |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1965 +/- ##
==========================================
- Coverage 79.45% 79.19% -0.26%
==========================================
Files 15 15
Lines 1285 1293 +8
Branches 285 260 -25
==========================================
+ Hits 1021 1024 +3
- Misses 225 230 +5
Partials 39 39 ☔ View full report in Codecov by Sentry. |
Actually, I'm not sure this needs fixing at all. We discussed it earlier in the original PR. AgentSet is a sequence, so it behaves like a list. |
Ah, you are correct! Didn't think of it that way. But I agree, the use cases where the difference matters are hopefully not used in the wild, so I think we can close an eye on semver in this case. Btw is it possible to call |
What dunder method would be called when you do that? update: I just checked and it works. |
So, let's get this merged and get 2.2.1 online next. |
As #pointed out by @Corvince,
RandomActivationByType.agents_by_typ
e in 2.2 behaved differently from 2.1.5. This is a simple fix for this, with a warning added to raise awareness of future changes.