Skip to content
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

Size issue with rewards_df #19

Open
marota opened this issue Feb 1, 2021 · 3 comments
Open

Size issue with rewards_df #19

marota opened this issue Feb 1, 2021 · 3 comments

Comments

@marota
Copy link
Owner

marota commented Feb 1, 2021

In

data.append({"action": run.action, "timestep": t, "reward": run.rewards[t], "overload_reward": run.other_rewards[t]["overload_reward"]})

Contrary to run.rewards, run.other_rewards does not have the length of rewards_df.shape[0] if the configuration did not run until the end of the scenario.

Changing "for t in range(run.rewards.shape[0])" "for t in range(run.nb_timestep)" is probably not enough as a new issue raises later
image

@marota
Copy link
Owner Author

marota commented Feb 1, 2021

@mjothy Reproductible with
input_data_test_otherReward.zip

python main -d 1 -f oracle4grid/ressources/actions/wcci_test/agg_unitary_actions.json -e some_folder/input_data_test_otherReward -c 0 -as 249524660 -es 508848152
with timestep=50 and depth=1

config 'sub-1-6' stops running at timestep=45

@NMegel
Copy link
Collaborator

NMegel commented Feb 16, 2021

The problem comes from grid2op Runner (in the post-release version that we are using in Oracle for the moment)
The convention between res.rewards and res.other_rewards is not the same in case there is a game over within the simulation (one gets NaN, one gets its array shortened to the divergence timestep)

To handle this situation, a temporary fix has been set in run_many.py in commit 276fa69

Some harmonisation has been asked in Grid2op, with the following reproductible code

reproductibility_grid2op.zip

@NMegel
Copy link
Collaborator

NMegel commented Feb 17, 2021

An issue has been raised in grid2op repo
Grid2op/grid2op#170

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

No branches or pull requests

2 participants