skorch
skorch copied to clipboard
Use terminal coloring library
Currently, color highlighting is homebrew. We could use a package instead, e.g. https://github.com/tartley/colorama.
Advantages:
- potentially more features
- claims to work on Windows
- no more custom code (Enum doesn't work in Python 2.7)
Disadvantages:
- one more dependency
https://github.com/tartley/colorama seems to be most popular at the moment.
Another option would be https://pypi.python.org/pypi/colored
jupyter notebook and most *NIX terminals support xterm and ansi100 colors (~256) colors. On the other hand, does it make sense to include many colors that are visually indistinguishable from each other?
If we use a library that supports xterm colors (and actually is intelligent enough to evaluate the type of the terminal, e.g. https://github.com/broadinstitute/xtermcolor) we should probably use only colors that differ a few degrees in color space.
Can we just add a couple of more colors and be fine with that? I believe that using an external library to add more colors is low priority right now. One major advantage would be colors in Windows, but since pytorch does not support Windows right now, there is no hurry.
There are issues like https://github.com/timothygebhard/skorch/commit/bdbd96d12bf64a277677984760d9cfce14804425 where the PrintLog
might need to switch coloring modes depending on the output destination. A good library could do that for us.