How to print console logs to textfile?

Hi,

How do I print the console logs (such as the one in the attached image) in a textfile?

For tf, I just run the command line with 2>logfile, which redirects stderr to a file.

Hi,

Did this:

but still doesn’t work.

You still need the “2>…” part for stderr, I think. I’m no MS CMD expert, but I believe what you want is:

python -m bin.main train_and_eval --model config/models/nmt_small.py --config config/opennmt-defaults.yml config/data/toy-ende.yml 1>opennmt.log 2>&1

2 Likes

Thank you so much. It worked :slight_smile: