-
-
Notifications
You must be signed in to change notification settings - Fork 694
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
Add params
and rng
argument to all FuncEnv
member functions
#900
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a glance seems alright, except it would be nice if the rng
argument was also optional. Can you check if that works well, and if so, add tests for all variants of calling the functions? (implicit None, explicit None, explicit non-trivial arguments)
return state[1] > 0 | ||
|
||
|
||
def test_api(): | ||
env = BasicTestEnv() | ||
state = env.initial(None) | ||
obs = env.observation(state) | ||
obs = env.observation(state, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the rng argument optional the same way as params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should rng
default be handled?
If an environment's needs transition
member function requires rng
, what should be done?
In the case of parameters, there is clearly a default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RedTachyon check the above comment Thanks |
Co-authored-by: Mark Towers <mark.m.towers@gmail.com> Co-authored-by: Pratik Ingle <prin@itu.dk> Co-authored-by: Jose Antonio Martin H <ja.martin.h@repsol.com> Co-authored-by: Oli <ollihaus@t-online.de> Co-authored-by: Jared Swift <j.w.swift@outlook.com> Co-authored-by: Tim Schneider <mail@tim-schneider.me> Co-authored-by: Tim Schneider <tim@robot-learning.de> Co-authored-by: Tim Schneider <tim.schneider94@t-online.de> Co-authored-by: Manuel Goulão <msilvagoulao@gmail.com> Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com> Co-authored-by: TobiasKallehauge <tkal@es.aau.dk> Co-authored-by: Ariel Kwiatkowski <ariel.j.kwiatkowski@gmail.com> Co-authored-by: James Mochizuki-Freeman <jameymmf@gmail.com>
Description
Fixes #851, #861
Type of change
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)