-
Notifications
You must be signed in to change notification settings - Fork 947
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
feat: Display model seed & allow user to specify it in JupyterViz #2069
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
75134fb
feat: Show model seed in render_in_browser output
rht e9fb378
Apply workaround for model_class __new__ not being executed by default
rht f645226
Restyle play+stop button to be Solara blue color
rht 29f6194
Simplify initial grid layout creation
rht c6bcc6c
Switch test_call_space_drawer to using pytest
rht 9e30ab5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 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
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 |
---|---|---|
|
@@ -55,6 +55,7 @@ dev = [ | |
"pytest >= 4.6", | ||
"pytest-cov", | ||
"sphinx", | ||
"pytest-mock", | ||
] | ||
docs = [ | ||
"sphinx", | ||
|
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
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.
Can we explicitly pass in the random model seed so it is obvious to the user where the seed is coming form and what they are changing is they pass in their own?
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 is already an explicit argument. Specified by adding a "seed" entry to the
model_params
dictionary: https://github.com/projectmesa/mesa-examples/blob/main/examples/schelling_experimental/app.py#L21.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.
I forgot to remove that line from the docstring.
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.
@rht I am sorry I don't mean to belabor this, but I feel like I am missing something here. So please bear with me, my understanding is below.
Scenario 1: User does not specify the seed so we want the UI to show the seed that was selected. Shouldn't the display of the random seed reference obj._seed
Scenario 2: User specifies the seed* then it would display the "seed" parameter or still reference obj._seed
Thank you for bearing with me, I know we have had issues with the seed in the past and just want to make doubly sure we have one solid pointer to the model seed.
Let me know what you think
*Apologies my earlier comment was very confusing. seed should come from
model_params
and be explicitly displayed not explicitly passed.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.
The direction of the cause and effect should flow from the controls you see on the screen, and then the model properties. It can't be the
obj._seed
to have a value before the control.If you notice, the seed value is displayed twice. The one below the information card is
model._seed
, displayed for debugging purpose. I will remove this once you agree to merge.