Support Crayon Logging

(srush) #1

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

How do I use Crayon?
(Pltrdy) #2


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
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.


(srush) #3

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

(Pltrdy) #4

@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:

(Pltrdy) #5

@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?

(srush) #6

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

(Pltrdy) #7

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