OHDSI / PatientLevelPrediction

An R package for performing patient level prediction in an observational database in the OMOP Common Data Model.
https://ohdsi.github.io/PatientLevelPrediction
187 stars 88 forks source link

PLP install check Response code: 247357937827 #116

Closed dramacloak closed 5 years ago

dramacloak commented 5 years ago

I've installed the "efficient" branch but am still running into the same issue.

devtools::install_github(OHDSI/PatientLevelPrediction, ref = efficient, INSTALL_opts = "--no-multiarch") Error in lapply(repo, github_remote, ref = ref, subdir = subdir, auth_token = auth_token, : object 'OHDSI' not found devtools::install_github("OHDSI/PatientLevelPrediction", ref = "efficient", INSTALL_opts = "--no-multiarch") Downloading GitHub repo OHDSI/PatientLevelPrediction@efficient Skipping 1 packages not available: FeatureExtraction √ checking for file 'C:\Users\955990\AppData\Local\Temp\RtmpyYmZg6\remotes146c7d34ab6\OHDSI-PatientLevelPrediction-c3bd4ab/DESCRIPTION' (463ms)

  • preparing 'PatientLevelPrediction': (659ms) √ checking DESCRIPTION meta-information ...
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts (3.5s)
  • checking for empty or unneeded directories
  • looking to see if a 'data/datalist' file should be added
  • building 'PatientLevelPrediction_3.0.0.tar.gz'

Installing package into ‘C:/Users/955990/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified)

Rd warning: C:/Users/955990/AppData/Local/Temp/RtmpcBMZD3/R.INSTALL1b3c28c27b79/PatientLevelPrediction/man/plotSmoothCalibration.Rd:38: missing link 'save_plot()' plotSparseCalibration html
plotSparseCalibration2 html
plotSparseRoc html
plotVariableScatterplot html
plpDataSimulationProfile html
positiveLikelihoodRatio html
positivePredictiveValue html
predictFfdf html
predictPlp html
predictProbabilities html
registerParallelBackend html
registerSequentialBackend html
runEnsembleModel html
runPlp html
runPlpAnalyses html
saveEnsemblePlpModel html
saveEnsemblePlpResult html
savePlpData html
savePlpModel html
savePlpResult html
savePrediction html
savePredictionAnalysisList html
sensitivity html
setAdaBoost html
setAdaBoost2 html
setCIReNN html
setCNNTorch html
setCovNN html
setCovNN2 html
setCoxModel html
setDecisionTree html
setDecisionTree2 html
setDeepNN html
setGradientBoostingMachine html
setKNN html
setLRTorch html
setLRTorch2 html
setLassoLogisticRegression html
setMLP html
setMLP2 html
setMLPTorch html
setMLPTorch2 html
setNaiveBayes html
setNaiveBayes2 html
setPythonEnvironment html
setRNNTorch html
setRNNTorch2 html
setRandomForest html
setRandomForest2 html
setSagemakerBinary html
similarPlpData html
simulatePlpData html
specificity html
timeSplitter html
toPlpData html
toSparseM html
toSparsePython html
toSparseTorchPython html
toSparseTorchPython2 html
transportModel html
transportPlp html
viewPlp html
building package indices installing vignettes ** testing if installed package can be loaded

Attaching package: ‘PatientLevelPrediction’

The following object is masked from ‘package:FeatureExtraction’:

bySumFf

connectionDetails <- createConnectionDetails(

  • dbms="postgresql",
  • server="localhost/OHDSI",
  • user="postgres",
  • password='',
  • port="5432")

    Patient Level Prediction

    options(fftempdir = "F:/Github OHDSI/fftemp") #next line doesn't seem work when this is used

    options(expressions=1000)

    PatientLevelPrediction::checkPlpInstallation(connectionDetails = connectionDetails, python = T) Checking database connectivity Connecting using PostgreSQL driver

  • Done

Checking R population Generating covariates Generating cohorts Generating outcomes Generating exclusion

Checking Models

Initialize Python Version 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)]

Checking support for large data objects

PatientLevelPrediction installation check completed...

Response code: 247357937827 Issue with createStudyPopulation() Issue with lasso logistic regression Issue with random forest Issue with mlp Issue with ada boost Issue with decison tree Issue with naive bayes Issue with knn Issue with gradient boosting machine NULL Warning messages: 1: 'OhdsiRTools::getLoggers' is deprecated. Use 'ParallelLogger::getLoggers' instead. See help("Deprecated") 2: 'createLogger' is deprecated. Use 'ParallelLogger::createLogger' instead. See help("Deprecated") 3: 'createConsoleAppender' is deprecated. Use 'ParallelLogger::createConsoleAppender' instead. See help("Deprecated")

Running with options(expressions=1000) does not help either.

options(expressions=1000) PatientLevelPrediction::checkPlpInstallation(connectionDetails = connectionDetails, python = T) Checking database connectivity Connecting using PostgreSQL driver

  • Done

Checking R population Generating covariates Generating cohorts Generating outcomes Generating exclusion

Checking Models

Checking support for large data objects

PatientLevelPrediction installation check completed...

Response code: 247357937827 Issue with createStudyPopulation() Issue with lasso logistic regression Issue with random forest Issue with mlp Issue with ada boost Issue with decison tree Issue with naive bayes Issue with knn Issue with gradient boosting machine NULL

Similarly, running with options(fftempdir = "F:/Github OHDSI/fftemp") does not help.

sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

other attached packages: [1] PatientLevelPrediction_3.0.0 Cyclops_2.0.1 FeatureExtraction_2.2.1 DatabaseConnector_2.2.1

loaded via a namespace (and not attached): [1] Rcpp_1.0.0 lattice_0.20-38 tidyr_0.8.2 SqlRender_1.6.0 prettyunits_1.0.2 ps_1.3.0
[7] assertthat_0.2.0 rprojroot_1.3-2 digest_0.6.18 foreach_1.4.4 R6_2.4.0 plyr_1.8.4
[13] OhdsiRTools_1.7.0 backports_1.1.3 httr_1.4.0 ggplot2_3.1.0 pillar_1.3.1 rlang_0.3.1
[19] lazyeval_0.2.1 curl_3.3 rstudioapi_0.9.0 data.table_1.12.0 callr_3.1.1 Matrix_1.2-15
[25] PythonInR_0.1-6 desc_1.2.0 urltools_1.7.2 devtools_2.0.1 splines_3.5.2 htmlwidgets_1.3
[31] triebeard_0.3.0 bit_1.1-14 munsell_0.5.0 compiler_3.5.2 pack_0.1-1 pkgconfig_2.0.2
[37] pkgbuild_1.0.2 htmltools_0.3.6 tidyselect_0.2.5 tibble_2.0.1 ff_2.2-14 codetools_0.2-15 [43] viridisLite_0.3.0 crayon_1.3.4 dplyr_0.8.0.1 withr_2.1.2 MASS_7.3-51.1 grid_3.5.2
[49] jsonlite_1.6 gtable_0.2.0 DBI_1.0.0 magrittr_1.5 scales_1.0.0 zip_1.0.0
[55] cli_1.0.1 fs_1.2.6 remotes_2.0.2 openxlsx_4.1.0 fastmatch_1.1-0 ffbase_0.12.7
[61] iterators_1.0.10 tools_3.5.2 glue_1.3.0 purrr_0.3.0 processx_3.2.1 pkgload_1.0.2
[67] survival_2.43-3 colorspace_1.4-0 sessioninfo_1.1.1 memoise_1.1.0 plotly_4.8.0 rJava_0.9-10
[73] usethis_1.4.0

jreps commented 5 years ago

My setup was working but I decided to update all the PLP dependencies and now I get the same error - I installed the latest: DatabaseConnector, DatbaseConnecterJar, SqlRender, OhdsiRTools and FeaturnExtraction. I'll going to try and install earlier versions of these and figure out what one is interacting negatively with PLP

jreps commented 5 years ago

Update: seems to be an issue with OhdsiRTools::addDefaultFileLogger - I'm going to update the logger to use Parallel logger and see if this fixes the problem

dramacloak commented 5 years ago

Thanks for identifying the root of the issue. Any chance you can add in the 95% Confidence Intervals (which we calculate in the PLP code already) to the logged output as you update the logger (example as below)? These are in the EvaluatePlp.R file:

auc

OhdsiRTools::logTrace('Calculating AUC') if(nrow(prediction) < 100000){ auc <- computeAuc(prediction, confidenceInterval = T) OhdsiRTools::logInfo(sprintf('%-20s%.2f', 'AUC: ', auc[1]*100))

OhdsiRTools::logInfo(sprintf('%-20s%.2f', 'AUCr95: ', auc[2]*100)) #add updated logger version of this line

#OhdsiRTools::logInfo(sprintf('%-20s%.2f', 'AUCl95: ', auc[3]*100)) #add updated logger version of this line
schuemie commented 5 years ago

FYI: there should be no reason for having OhdsiRTools as a dependency any more. All relevant functions are now in ParallelLogger (and ParallelLogger is in CRAN).

jreps commented 5 years ago

I've updated the logger and didn't get the infinite loop error - I also updated the logging for the AUC. I'll commit these to the efficient branch later today.

jreps commented 5 years ago

I've updated in the efficient branch and it works ok for me, can you see whether it works ok for you also? Thanks

dramacloak commented 5 years ago

This works for me! Thanks!