Skip to content

Commit

Permalink
Added time log to function, updated log
Browse files Browse the repository at this point in the history
  • Loading branch information
mvankessel-EMC committed Sep 18, 2023
1 parent 8962db0 commit e3cc2b8
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 127 deletions.
124 changes: 0 additions & 124 deletions extras/1694775778_pare_log.txt

This file was deleted.

58 changes: 58 additions & 0 deletions extras/1695023475_pare_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[*] Generated PaRe report for BrokenAdaptiveRidge [53.08 secs]
[*] Generated PaRe report for CohortExplorer [55.26 secs]
[*] Generated PaRe report for Eunomia [1 mins]
[*] Generated PaRe report for OhdsiSharing [1.04 mins]
[*] Generated PaRe report for Characterization [1.09 mins]
[*] Generated PaRe report for ResultModelManager [1.14 mins]
[*] Generated PaRe report for MethodEvaluation [1.17 mins]
[*] Generated PaRe report for Andromeda [33.57 secs]
[*] Generated PaRe report for BigKnn [26.67 secs]
[*] Generated PaRe report for Capr [1.09 mins]
[*] Generated PaRe report for FeatureExtraction [1.34 mins]
[*] Generated PaRe report for ROhdsiWebApi [1.47 mins]
[*] Generated PaRe report for CirceR [30.25 secs]
[*] Generated PaRe report for Hydra [36.18 secs]
[*] Generated PaRe report for CohortMethod [2.97 mins]
[*] Generated PaRe report for ShinyAppBuilder [32.39 secs]
[*] Generated PaRe report for PhenotypeLibrary [3.29 mins]
[*] Generated PaRe report for IterativeHardThresholding [23.39 secs]
[*] Generated PaRe report for Achilles [2.44 mins]
[*] Generated PaRe report for Cyclops [2.52 mins]
[*] Generated PaRe report for CohortGenerator [58.45 secs]
[*] Generated PaRe report for SqlRender [37.9 secs]
[*] Generated PaRe report for DataQualityDashboard [41.97 secs]
[*] Generated PaRe report for SelfControlledCaseSeries [1.47 mins]
[*] Generated PaRe report for PatientLevelPrediction [4.48 mins]
[*] Generated PaRe report for CohortDiagnostics [1.24 mins]
[*] Generated PaRe report for OhdsiShinyModules [3.68 mins]
[*] Generated PaRe report for DatabaseConnector [1.5 mins]
[*] Generated PaRe report for SelfControlledCohort [29.46 secs]
[!] Generating PaRe report for DeepPatientLevelPrediction failed
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* dplyr: dependency conflict
* ParallelLogger: dependency conflict
* rlang: dependency conflict
* withr: dependency conflict
* reticulate: dependency conflict
* ohdsi/PatientLevelPrediction: Can't install dependency ohdsi/ParallelLogger (>= 2.0.0)
* ohdsi/ParallelLogger: Conflicts with ParallelLogger


[*] Generated PaRe report for EmpiricalCalibration [1.01 mins]
[*] Generated PaRe report for PheValuator [39.94 secs]
[*] Generated PaRe report for ParallelLogger [35.9 secs]
[*] Generated PaRe report for EvidenceSynthesis [56.65 secs]
[!] Generating PaRe report for EnsemblePatientLevelPrediction failed
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* dplyr: dependency conflict
* ParallelLogger: dependency conflict
* rlang: dependency conflict
* tidyr: dependency conflict
* ohdsi/PatientLevelPrediction: Can't install dependency ohdsi/ParallelLogger (>= 2.0.0)
* ohdsi/ParallelLogger: Conflicts with ParallelLogger


10 changes: 7 additions & 3 deletions extras/runPaRe.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pareHades <- function(
packagesPath = "extras/packages.csv",
logPath = "./",
nCores = 10) {
start <- Sys.time()
pkgs <- read.csv(packagesPath)
pkgNames <- pkgs$name

Expand All @@ -35,6 +36,7 @@ pareHades <- function(

parallel::parLapply(cl = cl, X = pkgNames, fun = function(pkg) {
tryCatch({
start <- Sys.time()
repoDir <- file.path(tempdir(), pkg)

git2r::clone(
Expand All @@ -48,9 +50,9 @@ pareHades <- function(
repo = repo,
outputFile = file.path("docs/pare_reports/", sprintf("%s.html", pkg))
)

timeDiff <- round(Sys.time() - start, 2)
write(
x = sprintf("[*] Generated PaRe report for %s\n\n", pkg),
x = sprintf("[*] Generated PaRe report for %s [%s %s]", pkg, as.numeric(timeDiff), units(timeDiff)),
file = logFile,
append = TRUE
)
Expand All @@ -66,7 +68,9 @@ pareHades <- function(
)
})
})
message(sprintf("Worte reports to\n\t%s", "docs/pare_reports/"))
timeDiff <- round(Sys.time() - start, 2)
message(sprintf("Worte reports to: %s", "docs/pare_reports/"))
message(sprintf("Time: %s %s", as.numeric(timeDiff), units(timeDiff)))
return(NULL)
}

Expand Down

0 comments on commit e3cc2b8

Please sign in to comment.