imitation
imitation copied to clipboard
`.npz`-formatted files saved with `.pkl` extension
Bug description
The save
function in data/types.py
saves sequences of trajectories in numpy's .npz
format. That said, some scripts save these with the name final.pkl
or similar, making it appear that the files are pickle-formatted. Fixing this basically seems to break a few other things (see my recent reverted commits in https://github.com/HumanCompatibleAI/imitation/pull/519), and patching things over would steal focus away from my main task right now.
Steps to reproduce
Run python -m imitation.scripts.train_rl with pendulum common.fast train.fast rl.fast fast common.log_dir=quickstart/rl/
.
I should say that 'my recent reverted commits' refer to commits b2bcb40 and 2bf4dee.
Not immediately obvious to me why the other tests are failing, probably we're assuming pkl extension somewhere else in the code and will need to change it everywhere. This seems worthwhile but I agree doesn't belong in the CNN PR :)
So, that causes some tests to fail. Once you fix that problem, then tests fail because they're expecting to see a .npz
file somewhere but can't find it - I guess because it isn't being generated, or isn't part of some existing set of files?
Kinda hard to say what's going on without seeing the stack trace. There are some files in tests/testdata
that are still in .pkl
format.
I think that's probably what's going on.
@Rocamonde do you mind taking a look at this sometime in the next few weeks? Not time sensitive, I don't think it's blocking anyone, more just causing confusion.
Sure, will put it on my TODO list.