rstudio / tensorflow

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

R history is destroyed when tensorflow is used #576

Closed vjcitn closed 1 year ago

vjcitn commented 1 year ago
> library(tensorflow)
0/0 packages newly attached/loaded, see sessionInfo() for details.
> tfp <- tf_probability()
2023-07-04 14:08:49.038588: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-07-04 14:08:49.040524: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-07-04 14:08:49.082073: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-07-04 14:08:49.082466: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-07-04 14:08:49.907817: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
> tfp$distributions$Normal(loc=0, scale=1)
<tfp.distributions.Normal 'Normal' batch_shape=[] event_shape=[] dtype=float32>

at this point, history() will only show the last command for tfp$distributions ... bug?

> sessionInfo()
R version 4.3.0 Patched (2023-04-24 r84317)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /home/stvjc/R-430-dist/lib/R/lib/libRblas.so 
LAPACK: /home/stvjc/R-430-dist/lib/R/lib/libRlapack.so;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/New_York
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tensorflow_2.11.0 rmarkdown_2.23   

loaded via a namespace (and not attached):
 [1] digest_0.6.32   base64enc_0.1-3 fastmap_1.1.1   xfun_0.39      
 [5] Matrix_1.5-4.1  lattice_0.21-8  magrittr_2.0.3  reticulate_1.30
 [9] rappdirs_0.3.3  knitr_1.43      htmltools_0.5.5 png_0.1-8      
[13] cli_3.6.1       grid_4.3.0      withr_2.5.0     tfruns_1.5.1   
[17] compiler_4.3.0  rprojroot_2.0.3 here_1.0.1      tools_4.3.0    
[21] whisker_0.4.1   evaluate_0.21   startup_0.20.0  Rcpp_1.0.10    
[25] jsonlite_1.8.7  rlang_1.1.1    
t-kalinowski commented 1 year ago

Thanks for reporting. Unfortunately, I can't reproduce locally on Ubuntu.

0/0 packages newly attached/loaded, see sessionInfo() for details.

I don't see this output. Is this perhaps due to the fact that R/RStudio is loading a previously saved session ".RData" file? That might explain the wonky history results too.

github-actions[bot] commented 1 year ago

Automatically closed because there has not been a response for 30 days. When you're ready to work on this further, please comment here and the issue will automatically reopen.