How to print console logs to textfile?


(Kristine Mae Adlaon) #1


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

(David Landan) #2

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

(Kristine Mae Adlaon) #3


Did this:

but still doesn’t work.

(David Landan) #4

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/ --config config/opennmt-defaults.yml config/data/toy-ende.yml 1>opennmt.log 2>&1

(Kristine Mae Adlaon) #5

Thank you so much. It worked :slight_smile: