question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[proposal] Public `VecNormalize._normalize_observation`

See original GitHub issue

I have saved demonstrations from a particular environment, and also a PPO2 policy trained on a normalized version of the same environment.

To properly compare the unnormalized observations in the demonstration against the PPO2 policy I am using VecNormalize._normalize_observation(obs_demo). For ease of use, I’m wondering if the maintainers would be fine with:

  1. Rename _normalize_obs to normalize_obs so that it is a “public” method.
  2. Add training param to normalize_obs() so that we can call the normalize_obs without changing normalizing statistics. VecNormalize.step() would call self.normalize_obs(obs, training=self.training).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
araffincommented, Dec 10, 2019

Good point, i think this is also a good moment to rename rew to reward

@araffin Did you mean that you want to rename self.get_original_{rew=>rewards}? (If so I will also self.get_original_{obs=>observations}

only the first one (the 2nd one would break some code and is maybe too long), and it would be singular i think (but it does not really matter)

1reaction
araffincommented, Dec 7, 2019

Good point, i think this is also a good moment to rename rew to reward

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vectorized Environments - Stable Baselines3 - Read the Docs
Loads a saved VecNormalize object. Parameters. load_path ( str ) – the path to load from. venv ( VecEnv ) – the VecEnv...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found