Skip to content
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

Improve type stability of reinforcement learning #487

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

harisorgn
Copy link
Member

Improves type stability and therefore RAM usage of run_experiment!, mainly on the learning rule structs.

Thanks @MasonProtter for the tips, feel free to review.

Copy link
Contributor

@MasonProtter MasonProtter left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@harisorgn harisorgn merged commit 6e9048f into master Nov 6, 2024
6 checks passed
@harisorgn harisorgn deleted the ho/RL_type_stability branch November 6, 2024 21:56
david-hofmann pushed a commit that referenced this pull request Nov 11, 2024
* import Symbolics.variable

* add concrete types to learning rule fields

* add function to narrow Dict type

* narrow `learning_rules` type

* use a `Union{Nothing, Num}` instead of `Num` so that `maybe_set_state_*` works
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.

2 participants