Skip to content

Seeding RL Folder #178

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

Merged
merged 11 commits into from
Sep 4, 2024
Merged

Seeding RL Folder #178

merged 11 commits into from
Sep 4, 2024

Conversation

harshmahesheka
Copy link
Contributor

Partially adding RL implementations, which was part of my GSoC project, to mesa-examples. The current pr contains the addition of documentation, tutorials and the Epstein-civil violence model.

Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR! I will try to review it in detail Wednesday.

On a high level, the way you structured it looks good!

Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, it looks like a very complete PR including documentation and visualisation. I added some comments. They are all just suggestions, if you like them you can adopt them if not it's also okay.

Finally, consider adding a test_rl optional dependency in the pyproject.toml, so we know what dependencies are needed to run this RL example.

[project.optional-dependencies]
test = [
"pytest",
"scipy",
]
test_gis = [
"pytest",
"momepy",
]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice visualisation!

Can we add some metric for how well the cops are doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added some lines about the nature of Readme; specifying particular metrics might be challenging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like mean arrest per cop per day?

@harshmahesheka
Copy link
Contributor Author

Thanks for all the suggestions, @EwoutH and @rht . I have included most of that suggestions and pushed updated code.

@EwoutH
Copy link
Member

EwoutH commented Sep 1, 2024

I'm doing some CI testing on this branch. CI runs here.

@EwoutH
Copy link
Member

EwoutH commented Sep 1, 2024

I seem to be needing far more dependencies, at least

rl_example = [
    "stable-baselines3",
    "seaborn",
    "mesa",
    "tensorboard",
    "ray",
    "dm_tree",
    "pyarrow",
    "typer",
]

It looks like especially "ray" needs alot, that isn't installed by default.

Edit: Should we install ray with the rllib extra? ray[rllib]

@EwoutH
Copy link
Member

EwoutH commented Sep 2, 2024

One more point: Could you place everything specific to the Epstein model in an separate folder? Most already is, just make sure everything in the root rl folder is non-Epstein specific.

After that I'm good to merge, we could improve other points later.

@harshmahesheka
Copy link
Contributor Author

One more point: Could you place everything specific to the Epstein model in an separate folder? Most already is, just make sure everything in the root rl folder is non-Epstein specific.

After that I'm good to merge, we could improve other points later.

I think everything related to Epstein is in Esptein's folder. The example.py shows how to run esptein's model hence, it is in rl folder. It will be common for all runs

Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we probably will encounter some stuff when we're adding the CI, but we can solve those in separate PRs. For now this looks good.

Shall I merge?

@EwoutH EwoutH requested a review from jackiekazil September 3, 2024 10:37
@EwoutH
Copy link
Member

EwoutH commented Sep 3, 2024

@harshmahesheka for context, I asked @jackiekazil for a review, since she was your primary mentor on this project.

@jackiekazil
Copy link
Member

This looks good - I was already tracking. Thank you for this addition!
Between @EwoutH and @rht's review, I think everything was covered.

@jackiekazil jackiekazil merged commit c4b4c75 into projectmesa:main Sep 4, 2024
1 check passed
EwoutH pushed a commit to EwoutH/mesa-examples that referenced this pull request Sep 20, 2024
Add seeding RL examples folder (projectmesa#178)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants