-
Notifications
You must be signed in to change notification settings - Fork 319
Check If max_episode_length is None is NPO #2193
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,6 +102,8 @@ def __init__(self, | |
| self.policy = policy | ||
| self._scope = scope | ||
| self.max_episode_length = env_spec.max_episode_length | ||
| if self.max_episode_length == None: | ||
| raise ValueError("max_episode_length must not be None") | ||
|
||
| self._env_spec = env_spec | ||
| self._baseline = baseline | ||
| self._discount = discount | ||
|
|
||
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.
please place this validation above the long list of property initializations (i.e. first lines of this method), and put a newline after the if statement