Support Crayon Logging

This seems like a nice project. Would be neat to support it. (I’m in a visualization mood today)

https://github.com/torrvision/crayon

1 Like

Hi,

I do like the idea. Plus it’s a good way for me to start getting into OpenNMT code.
I started something on my fork https://github.com/pltrdy/OpenNMT/tree/crayon
Just added a parameter -exp EXPERIMENT_NAME that enable crayon logging and set the experiment name. Note that it will crash if already existing.
I currently only logging perplexity, learning rate and source token per second during training.

I’m not used to LUA nor OpenNMT, my code may break some good practice (e.g. used global variable for convenience, maybe not the best).

Have a look and to not hesitate to give some suggestions.

Paul

Awesome! I was thinking we probably want to be able to set the host and port for remote logging as well.

@srush: indeed. I just made a new commit (replacing the old one).
I added a class CrayonLogger under onmt/utils which defines its own parameters -exp, -exp_host and -exp_port.
Its working but is quite cheap: no error catching nor command line parameter validation.

Have a look:
https://github.com/pltrdy/OpenNMT/commit/597d974b2707d97e9e98140dc305142b25e2a16c

1 Like

@srush @guillaumekln What do you think about it?

Should we create a branch for crayon logging use cases? Do you have other user case ideas?

I think this can be in main, I will try to look today.

Pull Request #159: CrayonLogger: OpenNMT metrics visualization with TensorBoard