Skip to content

Set default controller #19

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 2 commits into from
May 26, 2022

Conversation

findmyway
Copy link
Member

  • Set InsertSampleRatioController as the default controller in Trajectory.
  • Add default parameters for InsertSampleRatioController
  • Support list comprehension and collect on Trajectory

InsertSampleController is removed for now.

@HenriDeh If I understand it correctly, the original InsertSampleController is to control the total number of sampled batches. That seems like a very rare use case to me. After adding default parameters for InsertSampleRatioController, I think it is preferable, as you can see in the test cases. If you think it is still useful, I can add it back. But we'd better to rename it to MaxSampleController or something similar.

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2022

Codecov Report

Merging #19 (367310f) into main (9808604) will decrease coverage by 1.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   69.97%   68.95%   -1.02%     
==========================================
  Files           9        9              
  Lines         373      364       -9     
==========================================
- Hits          261      251      -10     
- Misses        112      113       +1     
Impacted Files Coverage Δ
src/controllers.jl 100.00% <100.00%> (ø)
src/trajectory.jl 79.62% <100.00%> (-1.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9808604...367310f. Read the comment docs.

@HenriDeh
Copy link
Member

Perhaps I misunderstood how sampling will work in practice in the run function. What I meant to implement is the equivalent of

for (i, batch) in traj
#do stuff
i == n && break
end

If you feel it does not make sense, then it's probably the case.

@findmyway
Copy link
Member Author

In that case, InsertSampleRatioController would be enough. I'll add more examples in RLCore soon.

@findmyway findmyway merged commit 64e8287 into JuliaReinforcementLearning:main May 26, 2022
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.

3 participants