Fix forest_fire notebook for Mesa 4 compatibility#422
Open
Vanya-kapoor wants to merge 1 commit intomesa:mainfrom
Open
Fix forest_fire notebook for Mesa 4 compatibility#422Vanya-kapoor wants to merge 1 commit intomesa:mainfrom
Vanya-kapoor wants to merge 1 commit intomesa:mainfrom
Conversation
|
Hey, good work on this! The migration approach is solid and you've got the right idea. Just a couple of things to sort out before it's ready to merge: The big ones:
Smaller things:
Once those are fixed this should be good to go! |
Author
|
Thanks for your feedback.I have made the changes please see to it |
Collaborator
|
Keep your git history clean |
- Replace AgentSet.to_list() with list(self.agents) - Replace deprecated BatchRunner with mesa.batch_run() - Fix DataCollector import and DataFrame column name - Clean notebook outputs Fixes
7d33948 to
3a53352
Compare
Author
done @codebreaker32 |
Author
|
@EwoutH @jackiekazil @catherinedevlin this pr is ready to be merged! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes forest_fire notebook to work with Mesa 4, replacing removed
and deprecated APIs.
Changes:
with
import mesaandimport pandas as pdfire.run_model()withwhile fire.running: fire.step()fire.dc→fire.datacollectorBatchRunnerwithmesa.batch_run()df.BurnedOut→df["Burned Out"]Fixes #421
Related: #3132, #3270