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

Added AutomaticDefault module #47

Merged
merged 8 commits into from
Jun 5, 2023
Merged

Added AutomaticDefault module #47

merged 8 commits into from
Jun 5, 2023

Conversation

zsunberg
Copy link
Member

@zsunberg zsunberg commented Jan 24, 2021

This allows an algorithm writer to do, for example

using CommonRLInterface.AutomaticDefault: clone, valid_actions

Then clone will automatically try to use the clone provided by the environment, or fall back to deepcopy. Similarly valid_actions will use an environment's valid_actions or valid_action_mask or fall back to actions.

Still need to provide documentation. This will close #44 . I decided there was no need for an Optional module.

@codecov-io
Copy link

codecov-io commented Jan 24, 2021

Codecov Report

Merging #47 (5ebd63a) into master (fe73ac2) will decrease coverage by 4.34%.
The diff coverage is 69.56%.

❗ Current head 5ebd63a differs from pull request most recent head c9cf82f. Consider uploading reports for the commit c9cf82f to get more accurate results

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
- Coverage   74.46%   70.12%   -4.34%     
==========================================
  Files           3        6       +3     
  Lines          47       77      +30     
==========================================
+ Hits           35       54      +19     
- Misses         12       23      +11     
Impacted Files Coverage Δ
src/CommonRLInterface.jl 100.00% <ø> (+17.64%) ⬆️
src/wrappers.jl 100.00% <ø> (ø)
src/automatic_default.jl 62.06% <62.06%> (ø)
src/optional.jl 81.25% <81.25%> (ø)
src/quick_wrapper.jl 65.38% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zsunberg
Copy link
Member Author

Ok, this is done! This is a fairly significant addition, so I will wait a few days for comments from any stakeholders (@the-one-and-only-jackson, @findmyway , @jeremiahpslewis, @HenriDeh ). If anyone wants to give a review, it is welcome!

@zsunberg
Copy link
Member Author

zsunberg commented Jun 5, 2023

Hearing no objections, I am going to merge this.

@zsunberg zsunberg merged commit ad63dd9 into master Jun 5, 2023
2 checks passed
@zsunberg zsunberg deleted the modules branch June 5, 2023 21:00
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.

Optional and AutomaticDefault submodules
2 participants