janosh / tensorboard-reducer

Reduce multiple PyTorch TensorBoard runs to new event (or CSV) files.
https://pypi.org/project/tensorboard-reducer
MIT License
68 stars 4 forks source link

Not entirely sure whats going wrong?? #7

Closed shadowbourne closed 3 years ago

shadowbourne commented 3 years ago

image PS C:\Users\shadow\Desktop\tb> tb-reducer -i 'seed?/*' -o out Loaded 2 TensorBoard runs with 99 scalars and 383 steps each

shadowbourne commented 3 years ago

But please help as I think this tool is (or would be if i could get it to work) so useful!

janosh commented 3 years ago

I haven't tested tb-reducer on Windows so maybe a path separator issue? Could you zip and upload your event files here?

shadowbourne commented 3 years ago

files.zip

janosh commented 3 years ago

Thanks for your files. So there were multiple problems here.

First, tb-reducer rather short-sightedly did not yet support logs increasing in anything other than unit steps. It had to be

[
    {"step": 0, "value": 0.8129},
    {"step": 1, "value": 7234},
    {"step": 2, "value": 0.5224},
    ...
]

This is now fixed in tensorboard-reducer==0.2.0.

Second, it intentionally did not support runs with different step counts. In fact, there was a disclaimer in the readme about that (now removed). I should have looked at your screenshot more carefully. It clearly shows that seed0 reaches to about 50k steps, while seed1 only has ~18k steps. You can now explicitly tell tb-reducer that you are aware of this and would like to reduce those two runs anyway (using however many steps are available in the shortest run) by passing the --lax-steps flag.

Third, TensorBoard Reducer also intentionally did not support loading TensorBoard runs with non-identical sets of scalar tags. This constraint can also now be deactivated by passing --lax-tags. However, this wasn't an issue in your case.

In summary, could you try pip install -U tensorboard-reducer to make sure you're running 0.2.0 followed by tb-reducer -i 'seed?/*' -o out --lax-steps and see if it works now?

shadowbourne commented 3 years ago

Lovely work! new issues have emerged, but I shall close this issue and open another!