-
Notifications
You must be signed in to change notification settings - Fork 23
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve rollout utility #106
Comments
nhuet
added a commit
to nhuet/scikit-decide
that referenced
this issue
May 21, 2024
This fixes airbus#106 We merge rollout and rollout_episode together: - add a return_episodes boolean arg to rollout, deciding wether to return episodes - episodes are returned as a list of episodes, each episode being a tuple of observations, actions, and values (previously returned prematurely after one episode only one tuple even if num_episodes was >1) - update previous code using rollout_episode, by using rollout with return_episodes=True, and using the first episode of the list Fix verbose behaviour by setting back logger level to previous level at the end of the rollout. (Previously was setting once for all the logger level to debug, even when going out of rollout.)
nhuet
added a commit
to nhuet/scikit-decide
that referenced
this issue
May 21, 2024
This fixes airbus#106 We merge rollout and rollout_episode together: - add a return_episodes boolean arg to rollout, deciding wether to return episodes - episodes are returned as a list of episodes, each episode being a tuple of observations, actions, and values (previously returned prematurely after one episode only one tuple even if num_episodes was >1) - update previous code using rollout_episode, by using rollout with return_episodes=True, and using the first episode of the list Fix verbose behaviour by setting back logger level to previous level at the end of the rollout. (Previously was setting once for all the logger level to debug, even when going out of rollout.)
nhuet
added a commit
to nhuet/scikit-decide
that referenced
this issue
May 21, 2024
This fixes airbus#106 We merge rollout and rollout_episode together: - add a return_episodes boolean arg to rollout, deciding wether to return episodes - episodes are returned as a list of episodes, each episode being a tuple of observations, actions, and values (previously returned prematurely after one episode only one tuple even if num_episodes was >1) - in rollout_episode, verbose=False was muting the logger.info("goal reached ..."), instead we introduce a parameter to change the level of this logging. So that in particular in MetaPolicy, we can relegate it at debug level. - update previous code using rollout_episode, by using rollout with return_episodes=True, and using the first episode of the list Fix verbose behaviour by setting back logger level to previous level at the end of the rollout. (Previously was setting once for all the logger level to debug, even when going out of rollout.)
g-poveda
pushed a commit
that referenced
this issue
May 21, 2024
This fixes #106 We merge rollout and rollout_episode together: - add a return_episodes boolean arg to rollout, deciding wether to return episodes - episodes are returned as a list of episodes, each episode being a tuple of observations, actions, and values (previously returned prematurely after one episode only one tuple even if num_episodes was >1) - in rollout_episode, verbose=False was muting the logger.info("goal reached ..."), instead we introduce a parameter to change the level of this logging. So that in particular in MetaPolicy, we can relegate it at debug level. - update previous code using rollout_episode, by using rollout with return_episodes=True, and using the first episode of the list Fix verbose behaviour by setting back logger level to previous level at the end of the rollout. (Previously was setting once for all the logger level to debug, even when going out of rollout.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃殌 Feature
Fix, merge and improve rollout utilities
Pitch
There are currently 2 almost identical rollout utilities in utils.py (
rollout
androllout_episode
) that could be improved & merged into 1, which would avoid code duplication and be less confusing for end-users.I propose following changes:
rollout_episode
but add a booleanreturn_episodes
parameter torollout
to optionally enable the same feature (without current bugs, namely whenfrom_state
is None or whennum_episodes
> 1)save_file
feature by introducing afile_formatter
parameter enabling customisation of file content from collected episodes (alternatively, we could try to solve the 2 first points jointly e.g. by introducingepisodes_formatter
which, if not None, would collect episodes in a certain format and either return them or save them to file given thesave_file
parameter)step_callback
&episode_callback
) to give the end-user the option to add custom code within the rollout loopsThe text was updated successfully, but these errors were encountered: