-
Notifications
You must be signed in to change notification settings - Fork 925
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
Add support for Observables to MESA #2291
Merged
Merged
Changes from 121 commits
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
d90b0f7
further updates
quaquel 9586490
Update benchmarks/WolfSheep/__init__.py
quaquel 4aaa35d
Merge remote-tracking branch 'upstream/main'
quaquel d31478c
Merge remote-tracking branch 'upstream/main'
quaquel 6e4c72e
Merge remote-tracking branch 'upstream/main'
quaquel 70fbaf5
Merge remote-tracking branch 'upstream/main'
quaquel 724c8db
Merge remote-tracking branch 'upstream/main'
quaquel 45184a4
Merge remote-tracking branch 'upstream/main'
quaquel 3d75d30
Merge remote-tracking branch 'upstream/main'
quaquel 2759244
Update __init__.py
quaquel fc8aaea
Merge remote-tracking branch 'upstream/main'
quaquel 1ba465d
Merge remote-tracking branch 'upstream/main'
quaquel 2b5e822
Merge remote-tracking branch 'upstream/main'
quaquel 3847799
Merge remote-tracking branch 'upstream/main'
quaquel 301d80e
Merge remote-tracking branch 'upstream/main'
quaquel fe3d655
Merge remote-tracking branch 'upstream/main'
quaquel 7d18880
Merge remote-tracking branch 'upstream/main'
quaquel 6b49a3b
Merge remote-tracking branch 'upstream/main'
quaquel b9909e6
Merge remote-tracking branch 'upstream/main'
quaquel 8ce3d83
Merge remote-tracking branch 'upstream/main'
quaquel 88fbf74
Merge remote-tracking branch 'upstream/main'
quaquel b1965fc
wip
quaquel 7cf2384
ongoing
quaquel ba2affb
draft observables and signals
quaquel 21e185d
Update pyproject.toml
quaquel 75aa6d1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d594052
add observables to class, and signals to instances
quaquel 5d77796
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e3ac177
add HasObservables mixin and move signals back to experimental
quaquel 8fc657b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f58acd9
raise valueerror if owner does not have the observables attribute
quaquel 8300d5d
stash
quaquel 4499389
Update boltzmann_wealth.py
quaquel 15d74aa
ongoing work
quaquel 0f58754
Merge remote-tracking branch 'upstream/main' into signal
quaquel 718ab09
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1acca63
remove dependencies
quaquel 9537c3b
ruff fixes
quaquel 62d27ae
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a0102e9
make All() work for signal_type
quaquel c7cedde
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e4b9593
change how fallback_value is used
quaquel 99483f2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9d0fc75
Update observable_collections.py
quaquel dcf9564
add a BaseObservable class
quaquel 0e67153
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2a3f108
make BaseObserver an ABC and ruff fixes
quaquel 69d42db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 79f99a1
start of adding Computed and Computable
quaquel 65d4974
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2064c73
Update signal.py
quaquel 72b5445
Merge remote-tracking branch 'upstream/main' into signal
quaquel 5222518
remove wrongfully commited code
quaquel 29974b2
typing fix
quaquel 1588dbf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 51a6d0e
first testing of computable
quaquel dd17009
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e000097
basic version of computed works
quaquel 43b2a7b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cba2eec
Update test.py
quaquel 5e0e9d5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6505de0
Update signal.py
quaquel ca85bcd
fix for cycles
quaquel 4805252
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ed3c5ba
Update signal.py
quaquel 1e91ee5
Merge remote-tracking branch 'upstream/main' into signal
quaquel 304c63a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 820c176
update 1 benchmark model
quaquel 04ef6f1
some testing with timings
quaquel b3d8f9a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 74a641a
Merge remote-tracking branch 'upstream/main' into signal
quaquel 27313ec
Update boltzmann_wealth.py
quaquel 5ccf584
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2d90025
Update boltzmann_wealth.py
quaquel 2702bce
Merge branch 'main' into signal
quaquel b7c405c
perfcounter
quaquel 291c721
various cleanups
quaquel 658bf5e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 85cd317
Update test.py
quaquel f0c600b
Update __init__.py
quaquel f0c918a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8afea8c
cleaning
quaquel ee56159
Merge remote-tracking branch 'upstream/main' into signal
quaquel 95b647c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9169d20
cleaning and debugging code
quaquel 728b0d2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1482f07
Merge branch 'main' into signal
quaquel fab12d4
Update boltzmann_wealth.py
quaquel 34fd9ff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5f58aaa
Update mesa_signal.py
quaquel aa0b940
ongoing testing and cleaning
quaquel d539aa8
Merge remote-tracking branch 'upstream/main' into signal
quaquel ca9def1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6d96541
Merge remote-tracking branch 'upstream/main' into signal
quaquel 255e91c
switch from named tuple to attribute dict
quaquel 5f96bb8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 555621c
Merge remote-tracking branch 'upstream/main' into signal
quaquel 0dc29b8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 05e6d76
Merge remote-tracking branch 'upstream/main' into signal
quaquel 9c4ec7c
cleanup and merging with upstream
quaquel 3b2d240
Merge branch 'main' into signal
quaquel ac892f0
Merge branch 'main' into signal
quaquel b3320fb
first set of tests for Observable and HasObservable
quaquel cb1161b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d947b16
some ruff stuff
quaquel 7215073
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] da4c876
Update signals_util.py
quaquel 5486de9
Update test.py
quaquel bad310a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 272f512
Merge branch 'main' into signal
quaquel b6bbd97
Merge remote-tracking branch 'upstream/main' into signal
quaquel e50dd82
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 28c186c
initial unit tests for observable list
quaquel 9b17932
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3e1f578
additional tests
quaquel 9ea74d6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5e9e15f
include experimental in code coverage
quaquel 4b2ec6a
updates to tests
quaquel eeb87b2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9761abe
minor fix
quaquel 6460551
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] fd33efe
Update mesa_signal.py
quaquel 03bbf09
Merge branch 'signal_tests' into signal
quaquel 38d5462
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7ebde11
Merge branch 'main' into signal
quaquel 6640a1d
cleanup
quaquel 2a6ddb4
Merge branch 'main' into signal
quaquel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ coverage: | |
|
||
ignore: | ||
- "benchmarks/**" | ||
- "mesa/experimental/**" | ||
- "mesa/visualization/**" | ||
|
||
comment: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""Experimental init.""" | ||
|
||
from mesa.experimental import cell_space, devs | ||
from mesa.experimental import cell_space, devs, mesa_signals | ||
|
||
__all__ = ["cell_space", "devs"] | ||
__all__ = ["cell_space", "devs", "mesa_signals"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Functionality for Observables.""" | ||
|
||
from .mesa_signal import All, Computable, Computed, HasObservables, Observable | ||
from .observable_collections import ObservableList | ||
|
||
__all__ = [ | ||
"Observable", | ||
"ObservableList", | ||
"HasObservables", | ||
"All", | ||
"Computable", | ||
"Computed", | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would an
ObservableDict
(also) be useful, to be able to track which Agent the value originated from?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.
An
ObservableDict
would indeed also be useful. Not sure what you mean withThere 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.
I think I see what @EwoutH means here where it would be something like
{agent.unique_id: <observables>}