rstudio / tensorflow

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

Misleading error message in `set_random_seed()` if tensorflow is not available #587

Closed AshesITR closed 9 months ago

AshesITR commented 1 year ago

https://github.com/rstudio/tensorflow/blob/eeb1e66b57964c9b4b6baa26b8d462b198ce1437/R/seed.R#L158

tf_version() returns NULL if tensorflow is unavailable, causing the condition to error with "argument is of length zero".