Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-04-04 Thread Kieran Campbell
Hi all, Thanks for your replies. I had a look at the greta package (https://github.com/greta-dev/greta) on CRAN that uses tensorflow, which seemingly exports the install_tensorflow function but still requires the user to call it, so it looks like that's the best way to go for now. I'll submit our

Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-03-30 Thread Hervé Pagès
FWIW the tensorflow authors didn't opt for automatic lazy installation: > run_example("hello.R") Error: Installation of TensorFlow not found. Python environments searched for 'tensorflow' package: /usr/bin/python2.7 /usr/bin/python3.5 You can install TensorFlow using the install_t

Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-03-29 Thread Michael Lawrence
The problem with requiring explicit tensor flow installation is that it is tantamount to a system dependency in many ways, and those are annoying. Herve points out the problems with installing at load time. My suggestion was to install the package the first time someone tries to e.g. load an R matr

Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-03-29 Thread Kieran Campbell
Hi Hervé, Michael, Thanks for your feedback. I will add in the reticulate check to ensure tensorflow is installed prior to running and appropriate sections in the vignettes. We have one package essentially ready for submission to bioc, so is the best route forward to submit now or wait until tenso

Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-03-28 Thread Hervé Pagès
On 03/28/2018 02:41 PM, Hervé Pagès wrote: Hi Kieran, Note that you can execute arbitrary code at load time by defining an .onLoad() hook in your package. So you *could* put something like this in your package:   .onUnload <- function(libpath)   {     if (!reticulate::py_module_available("te

Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-03-28 Thread Hervé Pagès
Hi Kieran, Note that you can execute arbitrary code at load time by defining an .onLoad() hook in your package. So you *could* put something like this in your package: .onUnload <- function(libpath) { if (!reticulate::py_module_available("tensorflow")) tensorflow::install_tensorf

Re: [Bioc-devel] Tensorflow support for bioconductor packages

2018-03-28 Thread Michael Lawrence
Presumably the installation of tensor flow only has to happen once, so you could factor your interface such that it installs tensor flow lazily. Michael On Wed, Mar 28, 2018 at 9:23 AM, Kieran Campbell wrote: > Hi all, > > Rstudio have released the Tensorflow package for R - > https://tensorflo

[Bioc-devel] Tensorflow support for bioconductor packages

2018-03-28 Thread Kieran Campbell
Hi all, Rstudio have released the Tensorflow package for R - https://tensorflow.rstudio.com/tensorflow/ - and we have started incorporating it into some of our genomics packages for the heavy numerical computation. We would ideally like these to be submitted to Bioconductor, but there's a custom