rlworkgroup / dowel

A little logger for machine learning research
MIT License
32 stars 37 forks source link

Logging Numpy arrays, Torch Tensors and Tensorflow Tensors #46

Open BartKeulen opened 4 years ago

BartKeulen commented 4 years ago

Hi,

Thank you for this nice a simple tool for logging machine learning research. I often encounter situations where I would like to save multi-dimensional Numpy arrays. For example, the observation at each time-step in a reinforcement learning experiment.

It would be nice to have an output logger that supports Numpy arrays, Pytorch Tensors and Tensorflow Tensors.

I have written a simple output logger, NpzOutput, that writes Numpy arrays to a .npz file using Numpys savez functions. It is not optimal (no incremental saving), but thought I share it in case somebody is interested.

ryanjulian commented 4 years ago

@BartKeulen thanks for sharing! We'd love a pull request, if you have the time.

BartKeulen commented 4 years ago

Yes, that is possible. I will write the tests somewhere in the next 2 to 3 weeks and submit a pull request.