Skip to content

Commit

Permalink
Remove tensorflow logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dirmeier committed Aug 7, 2020
1 parent 89e7259 commit f4e7dbf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'macOS-latest', 'ubuntu-18.04']
os: ['macOS-latest', 'ubuntu-18.04']
tfp: ['0.11']
include:
- os: ubuntu-18.04
Expand Down Expand Up @@ -39,6 +39,7 @@ jobs:
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get install -y qpdf
export TF_CPP_MIN_LOG_LEVEL="3"
- name: install dependencies
run: Rscript -e "install.packages('remotes')" -e "remotes::install_deps(dependencies = TRUE)" -e "remotes::install_cran('rcmdcheck')"
- name: install python
Expand All @@ -56,6 +57,7 @@ jobs:
- name: coverage
continue-on-error: true
run: |
tar -C .. -xf $PKG_TARBALL- Rscript -e 'covr::codecov()'
tar -C .. -xf $PKG_TARBALL
Rscript -e 'covr::codecov()'
Rscript -e 'lintr::lint_package()'
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ Imports:
reticulate,
nloptr,
keras,
purrr
purrr,
methods
NeedsCompilation: yes
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export(group.lasso)
export(inverse.gaussian)
export(poisson)
import(Rcpp)
import(methods)
import(nloptr)
import(tensorflow)
import(tfprobability)
Expand Down
1 change: 1 addition & 0 deletions R/netReg-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#'
#' @useDynLib netReg, .registration = TRUE
#'
#' @import methods
#' @import tensorflow
#' @import tfprobability
#' @importFrom tensorflow tf
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
#' @importFrom reticulate py_module_available
#' @importFrom tensorflow install_tensorflow
.onLoad <- function(libname, pkgname) {
Sys.setenv(TF_CPP_MIN_LOG_LEVEL = 3)
if (!reticulate::py_module_available("tensorflow")) {
warning("Could not find tensorflow installation")
}
if (!reticulate::py_module_available("tensorflow_probability")) {
warning("Could not find tensorflow-probability installation")
}
Sys.setenv(TF_CPP_MIN_LOG_LEVEL = 2)
options(tensorflow.one_based_extract = TRUE)
}

Expand Down

0 comments on commit f4e7dbf

Please sign in to comment.