google-deepmind / bsuite

bsuite is a collection of carefully-designed experiments that investigate core capabilities of a reinforcement learning (RL) agent
Apache License 2.0
1.51k stars 182 forks source link

Fix bsuite datasets.py reshape bug. #24

Closed mikebjohanson closed 4 years ago

mikebjohanson commented 4 years ago

In the datasets.py parse_images function, the ndarray reshape method is used with a shape= keyword parameter. This keyword param isn't valid (the reshape method appears to only accept positional args for shape). As a result, the baseline agents' run_test.py tests fail on the MNIST test, when the parse_images function is called. This can be reproduced in a clean repo by pip installing the dependencies, cd bsuite/baselines/random, and running python3 run_test.py .

This commit just removes the shape= keyword to pass the shape as a positional argument, after which the agents' run_test.py tests succeed.

aslanides commented 4 years ago

This is fixed in 25c82a87a87031176ed364f7ba470fac3ad917d4.