rstudio / tensorflow

TensorFlow for R
https://tensorflow.rstudio.com
Apache License 2.0
1.33k stars 321 forks source link

Tensorboard fails to open if tensorflow prints warnings #605

Open RalphJO opened 1 month ago

RalphJO commented 1 month ago

Hello,

In tensorflow:::tensorboard_version(), if tensorflow gives any warnings the call will fail with Error: invalid version specification '<tensorflow warning text>'

This comes from this line of the code:

https://github.com/rstudio/tensorflow/blob/b68aa4acf840c130c398590efdb47aea5cd9d1b3/R/tensorboard.R#L145

Please could you consider adding an ignore.stderr = TRUE to the system call so that warnings from tensorflow are not parsed, only the stdout from tensorboard?

ver <- package_version(system("tensorboard --version_tb", intern = TRUE, ignore.stderr = TRUE)) 

Thank you,

Ralph

t-kalinowski commented 1 month ago

Thanks for the bug report! Would you like to submit a PR?

RalphJO commented 1 month ago

PR submitted, thanks.

https://github.com/rstudio/tensorflow/pull/606