From 18341e3d3f523a01876b2c2ffa6d14fc56c79029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Fr=C3=BDda?= Date: Fri, 7 Jun 2024 11:27:52 +0200 Subject: [PATCH] GH-16177: Validate h2o 3 package on r 4 4 and add test image to jenkins (#16291) * Add update dependencies for R 4.4.0 * Enable R 4.4.0 image * Fix runit_GBM_weight_gamma.R * Deal with .checkFieldsInMethod warning * Add html tidy to the R image for CRAN check * Fix runit_coxph_concordance.R test * Fix runit_coxph_concordance_heart.R test * Fix runit_coxph_predict.R * Fix runit_pubdev_8945_coxph_all_interactions_mojo.R * Fix runit_GBM_ecology.R * Install uplift package even if it was archived * Fix runit_GLM_libR_airlines.R * Fix runit_GLM_offset.R * Fix runit_PUBDEV_6037_fractionalbinomial_mojo.R * Fix runit_PUBDEV_8638_bodyfat_RID_Binomial_compareR_test.R * Fix runit_glrm_PUBDEV_3788_loss_by_col_err.R * Fix runit_isofor_accuracy.R * Fix runit_PUBDEV_8235_modelselection_gaussian_validation.R * Fix runit_OLD_1079_airlines.R * Fix runit_pubdev_6817_noK_PCA.R * Fix runit_pca_5_golden.R * Fix javapredict * Fix runit_head_tail.R * Fix runit_relevel.R * Fix runit_import_upload_singlequoted.R * Fix runit_ifelse.R * Fix runit_h2oconfig.R and .parse.h2oconfig in config.R * Fix runit_as.h2o_sparse.R * Fix runit_pubdev_8218.R * Fix runit_PUBDEV_7362_merge_duplicate_others.R * Fix runit_pubdev_1654.R * Fix runit_pubdev_1398.R * Fix runit_pubdev_1383.R * Fix runit_hexdev_29_categorical_continuous.R * Fix runit_GLM_offset.R for R 3.5 * Add DT to R 4.4 image * Do not set options(stringsAsFactors=TRUE) in the tests * Fix runit_as.h2o_sparse.R * Add new cran messages to validate_r_cmf_check_output.py * More changes to the validate_r_cmd_check_output.py --- docker/Jenkinsfile-build-docker | 2 +- docker/Makefile | 16 + docker/jenkins-images/Dockerfile-r | 3 +- docker/scripts/install_R_version | 655 ++++++++++++------ h2o-r/h2o-package/R/config.R | 4 +- h2o-r/h2o-package/R/explain.R | 6 +- h2o-r/scripts/h2o-r-test-setup.R | 1 - h2o-r/tests/runitUtils/shared_javapredict.R | 2 +- .../coxph/runit_coxph_concordance.R | 5 +- .../coxph/runit_coxph_concordance_heart.R | 2 +- .../testdir_algos/coxph/runit_coxph_predict.R | 5 +- ..._pubdev_8945_coxph_all_interactions_mojo.R | 2 - .../testdir_algos/gbm/runit_GBM_ecology.R | 2 +- .../gbm/runit_GBM_weight_gamma.R | 15 +- .../glm/runit_GLM_libR_airlines.R | 2 + .../testdir_algos/glm/runit_GLM_offset.R | 6 +- ...unit_PUBDEV_6037_fractionalbinomial_mojo.R | 3 +- ..._8638_bodyfat_RID_Binomial_compareR_test.R | 1 - .../runit_glrm_PUBDEV_3788_loss_by_col_err.R | 5 +- .../isofor/runit_isofor_accuracy.R | 6 +- ..._8235_modelselection_gaussian_validation.R | 2 +- .../pca/runit_OLD_1079_airlines.R | 1 - ...runit_pubdev_3502_pca_hangs_large_NOPASS.R | 1 - .../pca/runit_pubdev_6817_noK_PCA.R | 1 - .../tests/testdir_golden/runit_pca_5_golden.R | 2 +- ...runit_PUBDEV_5008_ordinal_glm_mojo_large.R | 2 +- ...t_PUBDEV_5303_multinomial_glm_mojo_large.R | 2 +- ...unit_PUBDEV_5355_binomial_glm_mojo_large.R | 2 +- ...it_PUBDEV_5529_leaf_node_assign_gbm_mojo.R | 1 - ...unit_PUBDEV_7185_binomial_gam_mojo_large.R | 2 +- ...runit_PUBDEV_7185_quasibinomial_gam_MOJO.R | 2 +- ...unit_PUBDEV_7860_binomial_gam_TP_CS_MOJO.R | 2 +- ..._8330_fractionalbinomial_glm_MOJO_offset.R | 2 +- ...UBDEV_8330_quasibinomial_glm_MOJO_offset.R | 2 +- ...unit_PUBDEV_8330_tweedie_glm_MOJO_offset.R | 2 +- .../runit_pubdev_4531_large.R | 3 +- .../runit_pubdev_5351_pca_mojo_large.R | 2 +- .../runit_pubdev_6617_setInvNumNA.R | 1 - ...runit_PUBDEV_7362_merge_duplicate_others.R | 82 ++- .../runit_hexdev_29_categorical_continuous.R | 3 +- .../runit_hexdev_29_import_types.R | 1 - h2o-r/tests/testdir_jira/runit_pubdev_1383.R | 2 +- h2o-r/tests/testdir_jira/runit_pubdev_1398.R | 2 +- h2o-r/tests/testdir_jira/runit_pubdev_1654.R | 2 +- .../runit_pubdev_5518_autoencoder_grid.R | 1 - h2o-r/tests/testdir_jira/runit_pubdev_8218.R | 6 +- .../testdir_misc/runit_PUBDEV-6775-2D-pdp.R | 1 - .../tests/testdir_misc/runit_as.h2o_sparse.R | 3 +- h2o-r/tests/testdir_misc/runit_h2oconfig.R | 8 +- h2o-r/tests/testdir_misc/runit_ifelse.R | 2 +- .../runit_import_upload_singlequoted.R | 4 +- .../runit_pubdev_5921_na_prints_large.R | 1 - h2o-r/tests/testdir_misc/runit_relevel.R | 2 +- .../testdir_munging/unop/runit_head_tail.R | 2 +- .../runit_GH_15741_force_col_types.R | 1 - .../runit_GH_15741_parquet_force_col_types.R | 1 - scripts/jenkins/groovy/buildConfig.groovy | 2 +- .../jenkins/groovy/defineTestStages.groovy | 16 + scripts/validate_r_cmd_check_output.py | 7 + 59 files changed, 600 insertions(+), 324 deletions(-) diff --git a/docker/Jenkinsfile-build-docker b/docker/Jenkinsfile-build-docker index c6ae3654059f..61f541ee9575 100644 --- a/docker/Jenkinsfile-build-docker +++ b/docker/Jenkinsfile-build-docker @@ -22,7 +22,7 @@ IMAGE_NAME_PREFIX = 'harbor.h2o.ai/opsh2oai/h2o-3' JDK_VERSIONS = ['8', '10', '11', '12', '13', '14', '15', '16', '17'] JDK_VERSIONS_PY_R = ['8', '11', '17'] // stable, last-supported, latest PYTHON_VERSIONS = ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] -R_VERSION = ['3.3.3', '3.4.1', '3.5.3', '3.6.2', '4.0.2'] +R_VERSION = ['3.3.3', '3.4.1', '3.5.3', '3.6.2', '4.0.2', '4.4.0'] def pipelineContext diff --git a/docker/Makefile b/docker/Makefile index 1680a8c1f93b..9847d489c01c 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -276,6 +276,22 @@ ifeq ($(shell echo $(PUSH) | tr [:upper:] [:lower:] ),true) docker push harbor.h2o.ai/opsh2oai/h2o-3/dev-r-4.0.2-jdk-$*:$(VERSION) endif +ifneq ($(CI), 1) +dev-r-4.4.0-jdk-%: dev-r-4.4.0 +endif +dev-r-4.4.0-jdk-%: + docker build -t harbor.h2o.ai/opsh2oai/h2o-3/dev-r-4.4.0-jdk-$*:$(VERSION) \ + $(NO_CACHE) \ + -f jenkins-images/Dockerfile-jdk-others \ + --build-arg FROM_VERSION=$(VERSION) \ + --build-arg FROM_IMAGE=harbor.h2o.ai/opsh2oai/h2o-3/dev-r-4.4.0 \ + --build-arg INSTALL_JAVA_VERSION=$* \ + --build-arg H2O_BRANCH=$(H2O_BRANCH) \ + . +ifeq ($(shell echo $(PUSH) | tr [:upper:] [:lower:] ),true) + docker push harbor.h2o.ai/opsh2oai/h2o-3/dev-r-4.4.0-jdk-$*:$(VERSION) +endif + ifneq ($(CI), 1) dev-r-%: dev-r-base endif diff --git a/docker/jenkins-images/Dockerfile-r b/docker/jenkins-images/Dockerfile-r index e9b592580a9f..4acda2697da8 100644 --- a/docker/jenkins-images/Dockerfile-r +++ b/docker/jenkins-images/Dockerfile-r @@ -9,7 +9,8 @@ ENV R_VERSION=${R_VERSION} # In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions # are silently merged during linking.). I tried using -fcommon but without much luck so due to the time constrain I # decided to use gcc-9 instead. -RUN apt-get update && apt-get install -y gcc-9 gfortran-9 g++-9 tcl-dev tk-dev && apt-get clean && apt-get autoremove -y && \ +RUN apt-get update && apt-get install -y gcc-9 gfortran-9 g++-9 tcl-dev tk-dev tidy && \ + apt-get clean && apt-get autoremove -y && \ rm -rf /var/cache/apt/* &&\ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 99 --slave /usr/bin/g++ g++ /usr/bin/g++-9 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-9 && update-alternatives --install /usr/bin/gfortran f95 /usr/bin/gfortran-9 99 diff --git a/docker/scripts/install_R_version b/docker/scripts/install_R_version index bdc9d89e5a13..193e226e7ddc 100755 --- a/docker/scripts/install_R_version +++ b/docker/scripts/install_R_version @@ -111,7 +111,8 @@ function getAndInstallFromCRAN(){ NAME="$1" VERSION="$2" getAndInstall "https://cran.r-project.org/src/contrib/Archive/${NAME}/${NAME}_${VERSION}.tar.gz" "$NAME" "$VERSION" || \ - getAndInstall "https://cran.r-project.org/src/contrib/${NAME}_${VERSION}.tar.gz" "$NAME" "$VERSION" || exit 1 + getAndInstall "https://cran.r-project.org/src/contrib/${NAME}_${VERSION}.tar.gz" "$NAME" "$VERSION" || \ + getAndInstall "https://cloud.r-project.org/src/contrib/Archive/${NAME}/${NAME}_${VERSION}.tar.gz" "$NAME" "$VERSION" || exit 1 set -x } @@ -175,214 +176,452 @@ function getAndInstallFromCRAN(){ # Install dependencies echo "Installing dependencies for R ${R_VERSION}" -getAndInstallFromCRAN abind 1.4-5 -getAndInstallFromCRAN acepack 1.4.1 -getAndInstallFromCRAN AUC 0.3.0 -getAndInstallFromCRAN backports 1.3.0 -getAndInstallFromCRAN base64enc 0.1-3 -getAndInstallFromCRAN bit 4.0.4 -getAndInstallFromCRAN bitops 1.0-7 -getAndInstallFromCRAN boot 1.3-18 -getAndInstallFromCRAN brew 1.0-6 -getAndInstallFromCRAN brio 1.1.2 -getAndInstallFromCRAN clipr 0.7.1 -getAndInstallFromCRAN cluster 2.0.5 -getAndInstallFromCRAN codetools 0.2-15 -getAndInstallFromCRAN colorspace 2.0-2 -getAndInstallFromCRAN commonmark 1.7 -getAndInstallFromCRAN cpp11 0.4.1 -getAndInstallFromCRAN crayon 1.4.2 -getAndInstallFromCRAN curl 4.3.2 -getAndInstallFromCRAN data.table 1.14.2 -getAndInstallFromCRAN DEoptimR 1.0-9 -getAndInstallFromCRAN digest 0.6.28 -getAndInstallFromCRAN diptest 0.76-0 -getAndInstallFromCRAN evaluate 0.14 -getAndInstallFromCRAN fansi 0.5.0 -getAndInstallFromCRAN farver 2.1.0 -getAndInstallFromCRAN fastmap 1.1.0 -getAndInstallFromCRAN foreign 0.8-67 -getAndInstallFromCRAN formatR 1.11 -getAndInstallFromCRAN Formula 1.2-4 -getAndInstallFromCRAN fs 1.5.0 -getAndInstallFromCRAN futile.options 1.0.1 -getAndInstallFromCRAN generics 0.1.1 -getAndInstallFromCRAN getopt 1.20.3 -getAndInstallFromCRAN gitcreds 0.1.1 -getAndInstallFromCRAN glue 1.5.0 -getAndInstallFromCRAN gtable 0.3.0 -getAndInstallFromCRAN gtools 3.9.2 -getAndInstallFromCRAN HDtweedie 1.1 -getAndInstallFromCRAN highlight 0.5.0 -getAndInstallFromCRAN ini 0.3.1 -getAndInstallFromCRAN isoband 0.2.5 -getAndInstallFromCRAN iterators 1.0.13 -getAndInstallFromCRAN jsonlite 1.7.2 -getAndInstallFromCRAN kernlab 0.9-29 -getAndInstallFromCRAN KernSmooth 2.23-15 -getAndInstallFromCRAN labeling 0.4.2 -getAndInstallFromCRAN lattice 0.20-34 -getAndInstallFromCRAN lazyeval 0.2.2 -getAndInstallFromCRAN LiblineaR 1.94-2 -getAndInstallFromCRAN magrittr 2.0.1 -getAndInstallFromCRAN MASS 7.3-45 -getAndInstallFromCRAN mclust 5.4.8 -getAndInstallFromCRAN mime 0.12 -getAndInstallFromCRAN misc3d 0.9-1 -getAndInstallFromCRAN mlbench 2.1-3 -getAndInstallFromCRAN MLmetrics 1.0.0 -getAndInstallFromCRAN modeltools 0.2-23 -getAndInstallFromCRAN mvtnorm 1.0-0 -getAndInstallFromCRAN nnet 7.3-12 -getAndInstallFromCRAN packrat 0.7.0 -getAndInstallFromCRAN pixmap 0.4-12 -getAndInstallFromCRAN pkgconfig 2.0.3 -getAndInstallFromCRAN praise 1.0.0 -getAndInstallFromCRAN prettyunits 1.1.1 -getAndInstallFromCRAN proxy 0.4-20 -getAndInstallFromCRAN ps 1.6.0 -getAndInstallFromCRAN R.methodsS3 1.8.1 -getAndInstallFromCRAN R6 2.5.1 -getAndInstallFromCRAN randomForest 4.6-14 -getAndInstallFromCRAN rappdirs 0.3.3 -getAndInstallFromCRAN RColorBrewer 1.1-2 -getAndInstallFromCRAN Rcpp 1.0.12 -getAndInstallFromCRAN RcppParallel 5.1.4 -getAndInstallFromCRAN remotes 2.4.1 -getAndInstallFromCRAN rlang 1.0.0 -getAndInstallFromCRAN rpart 4.1-10 -getAndInstallFromCRAN rprojroot 2.0.2 -getAndInstallFromCRAN rstudioapi 0.13 -getAndInstallFromCRAN RUnit 0.4.32 -getAndInstallFromCRAN slam 0.1-40 -getAndInstallFromCRAN sourcetools 0.1.7 -getAndInstallFromCRAN SparseM 1.81 -getAndInstallFromCRAN sparsepp 1.22 -getAndInstallFromCRAN spatial 7.3-11 -getAndInstallFromCRAN statmod 1.4.36 -getAndInstallFromCRAN stringi 1.7.5 -getAndInstallFromCRAN svd 0.5 -getAndInstallFromCRAN sys 3.4 -getAndInstallFromCRAN systemfonts 0.2.3 -getAndInstallFromCRAN tweedie 2.3.5 -getAndInstallFromCRAN utf8 1.2.2 -getAndInstallFromCRAN uuid 1.0-3 -getAndInstallFromCRAN versions 0.3 -getAndInstallFromCRAN viridisLite 0.4.0 -getAndInstallFromCRAN whisker 0.4 -getAndInstallFromCRAN withr 2.4.2 -getAndInstallFromCRAN xfun 0.28 -getAndInstallFromCRAN xml2 1.3.2 -getAndInstallFromCRAN xtable 1.8-4 -getAndInstallFromCRAN yaml 2.2.1 -getAndInstallFromCRAN zip 2.2.0 -getAndInstallFromCRAN checkmate 2.0.0 -getAndInstallFromCRAN bit64 4.0.5 -getAndInstallFromCRAN caTools 1.17.1.4 -getAndInstallFromCRAN RCurl 1.95-4.12 -getAndInstallFromCRAN munsell 0.5.0 -getAndInstallFromCRAN diffobj 0.3.5 -getAndInstallFromCRAN robustbase 0.93-7 -getAndInstallFromCRAN lambda.r 1.2.4 -getAndInstallFromCRAN optparse 1.7.1 -getAndInstallFromCRAN cli 3.1.0 -getAndInstallFromCRAN gridExtra 2.3 -getAndInstallFromCRAN foreach 1.5.1 -getAndInstallFromCRAN Matrix 1.2-8 -getAndInstallFromCRAN nlme 3.1-131 -getAndInstallFromCRAN sp 1.4-5 -getAndInstallFromCRAN class 7.3-14 -getAndInstallFromCRAN prabclus 2.3-2 -getAndInstallFromCRAN plot3D 1.4 -getAndInstallFromCRAN flexmix 2.3-17 -getAndInstallFromCRAN R.oo 1.24.0 -getAndInstallFromCRAN processx 3.5.2 -getAndInstallFromCRAN latticeExtra 0.6-28 -getAndInstallFromCRAN RcppArmadillo 0.10.7.3.0 -getAndInstallFromCRAN cachem 1.0.6 -getAndInstallFromCRAN ellipsis 0.3.2 -getAndInstallFromCRAN htmltools 0.5.2 -getAndInstallFromCRAN later 1.3.0 -getAndInstallFromCRAN lifecycle 1.0.1 -getAndInstallFromCRAN purrr 0.3.4 -getAndInstallFromCRAN desc 1.4.0 -getAndInstallFromCRAN stringr 1.4.0 -getAndInstallFromCRAN askpass 1.1 -getAndInstallFromCRAN highr 0.9 -getAndInstallFromCRAN tinytex 0.35 -getAndInstallFromCRAN rversions 2.1.1 -getAndInstallFromCRAN gplots 3.1.1 -getAndInstallFromCRAN futile.logger 1.4.3 -getAndInstallFromCRAN sessioninfo 1.2.1 -getAndInstallFromCRAN glmnet 2.0-2 -getAndInstallFromCRAN irlba 2.3.3 -getAndInstallFromCRAN survival 2.44-1.1 -getAndInstallFromCRAN xgboost 1.0.0.2 -getAndInstallFromCRAN mgcv 1.8-17 -getAndInstallFromCRAN ade4 1.7-18 -getAndInstallFromCRAN e1071 1.7-9 -getAndInstallFromCRAN flexclust 1.4-0 -getAndInstallFromCRAN fpc 2.2-9 -getAndInstallFromCRAN R.utils 2.11.0 -getAndInstallFromCRAN callr 3.7.0 -getAndInstallFromCRAN xopen 1.0.0 -getAndInstallFromCRAN memoise 2.0.0 -getAndInstallFromCRAN vctrs 0.3.8 -getAndInstallFromCRAN crosstalk 1.2.0 -getAndInstallFromCRAN fontawesome 0.2.2 -getAndInstallFromCRAN htmlwidgets 1.5.4 -getAndInstallFromCRAN jquerylib 0.1.4 -getAndInstallFromCRAN sass 0.4.0 -getAndInstallFromCRAN promises 1.2.0.1 -getAndInstallFromCRAN scales 1.1.1 -getAndInstallFromCRAN pkgload 1.2.3 -getAndInstallFromCRAN openssl 1.4.5 -getAndInstallFromCRAN knitr 1.36 -getAndInstallFromCRAN ROCR 1.0-7 -getAndInstallFromCRAN text2vec 0.5.0 -getAndInstallFromCRAN coin 1.0-0 -getAndInstallFromCRAN gbm 2.1.3 -getAndInstallFromCRAN penalized 0.9-51 -getAndInstallFromCRAN RItools 0.1-17 -getAndInstallFromCRAN pkgbuild 1.2.0 -getAndInstallFromCRAN webshot 0.5.2 -getAndInstallFromCRAN pillar 1.6.4 -getAndInstallFromCRAN tidyselect 1.1.1 -getAndInstallFromCRAN bslib 0.3.1 -getAndInstallFromCRAN httpuv 1.6.3 -getAndInstallFromCRAN credentials 1.3.0 -getAndInstallFromCRAN httr 1.4.2 -getAndInstallFromCRAN rsconnect 0.8.24 -getAndInstallFromCRAN htmlTable 2.3.0 -getAndInstallFromCRAN rmarkdown 2.11 -getAndInstallFromCRAN roxygen2 7.2.2 -getAndInstallFromCRAN tables 0.9.6 -getAndInstallFromCRAN rcmdcheck 1.4.0 -getAndInstallFromCRAN repr 1.1.3 -getAndInstallFromCRAN tibble 3.1.6 -getAndInstallFromCRAN shiny 1.7.1 -getAndInstallFromCRAN gert 1.3.0 -getAndInstallFromCRAN gh 1.3.0 -getAndInstallFromCRAN uplift 0.3.5 -getAndInstallFromCRAN IRdisplay 1.0 -getAndInstallFromCRAN dplyr 1.0.7 -getAndInstallFromCRAN ggplot2 3.3.5 -getAndInstallFromCRAN rematch2 2.1.2 -getAndInstallFromCRAN miniUI 0.1.1.1 -getAndInstallFromCRAN shinyjs 2.0.0 -getAndInstallFromCRAN usethis 2.0.1 -getAndInstallFromCRAN tidyr 1.1.4 -getAndInstallFromCRAN viridis 0.6.2 -getAndInstallFromCRAN pkgdown 1.5.1 -getAndInstallFromCRAN waldo 0.3.1 -getAndInstallFromCRAN manipulateWidget 0.11.1 -getAndInstallFromCRAN plotly 4.10.0 -getAndInstallFromCRAN Hmisc 4.3-0 -getAndInstallFromCRAN testthat 3.1.0 -getAndInstallFromCRAN rgl 0.100.54 -getAndInstallFromCRAN devtools 2.4.2 -getAndInstallFromCRAN plot3Drgl 1.0.2 +if [ "$R_VERSION" = "4.4.0" ]; then + getAndInstallFromCRAN abind 1.4-5 + getAndInstallFromCRAN acepack 1.4.2 + getAndInstallFromCRAN AUC 0.3.2 + getAndInstallFromCRAN backports 1.5.0 + getAndInstallFromCRAN base64enc 0.1-3 + getAndInstallFromCRAN bit 4.0.5 + getAndInstallFromCRAN bitops 1.0-7 + getAndInstallFromCRAN boot 1.3-30 + getAndInstallFromCRAN brew 1.0-10 + getAndInstallFromCRAN brio 1.1.5 + getAndInstallFromCRAN cli 3.6.2 + getAndInstallFromCRAN clipr 0.8.0 + getAndInstallFromCRAN cluster 2.1.6 + getAndInstallFromCRAN codetools 0.2-20 + getAndInstallFromCRAN colorspace 2.1-0 + getAndInstallFromCRAN commonmark 1.9.1 + getAndInstallFromCRAN cpp11 0.4.7 + getAndInstallFromCRAN crayon 1.5.2 + getAndInstallFromCRAN curl 5.2.1 + getAndInstallFromCRAN data.table 1.15.4 + getAndInstallFromCRAN deldir 2.0-4 + getAndInstallFromCRAN DEoptimR 1.1-3 + getAndInstallFromCRAN digest 0.6.35 + getAndInstallFromCRAN diptest 0.77-1 + getAndInstallFromCRAN evaluate 0.23 + getAndInstallFromCRAN fansi 1.0.6 + getAndInstallFromCRAN farver 2.1.2 + getAndInstallFromCRAN fastmap 1.2.0 + getAndInstallFromCRAN float 0.3-2 + getAndInstallFromCRAN foreign 0.8-86 + getAndInstallFromCRAN formatR 1.14 + getAndInstallFromCRAN Formula 1.2-5 + getAndInstallFromCRAN fs 1.6.4 + getAndInstallFromCRAN futile.options 1.0.1 + getAndInstallFromCRAN generics 0.1.3 + getAndInstallFromCRAN getopt 1.20.4 + getAndInstallFromCRAN gitcreds 0.1.2 + getAndInstallFromCRAN glue 1.7.0 + getAndInstallFromCRAN gtools 3.9.5 + getAndInstallFromCRAN HDtweedie 1.2 + getAndInstallFromCRAN highlight 0.5.1 + getAndInstallFromCRAN ini 0.3.1 + getAndInstallFromCRAN isoband 0.2.7 + getAndInstallFromCRAN iterators 1.0.14 + getAndInstallFromCRAN jpeg 0.1-10 + getAndInstallFromCRAN jsonlite 1.8.8 + getAndInstallFromCRAN kernlab 0.9-32 + getAndInstallFromCRAN KernSmooth 2.23-24 + getAndInstallFromCRAN labeling 0.4.3 + getAndInstallFromCRAN lattice 0.22-6 + getAndInstallFromCRAN lazyeval 0.2.2 + getAndInstallFromCRAN LiblineaR 2.10-23 + getAndInstallFromCRAN magrittr 2.0.3 + getAndInstallFromCRAN MASS 7.3-60.2 + getAndInstallFromCRAN matrixStats 1.3.0 + getAndInstallFromCRAN mclust 6.1.1 + getAndInstallFromCRAN mime 0.12 + getAndInstallFromCRAN misc3d 0.9-1 + getAndInstallFromCRAN mlbench 2.1-5 + getAndInstallFromCRAN modeltools 0.2-23 + getAndInstallFromCRAN mvtnorm 1.2-5 + getAndInstallFromCRAN nnet 7.3-19 + getAndInstallFromCRAN packrat 0.9.2 + getAndInstallFromCRAN pixmap 0.4-13 + getAndInstallFromCRAN pkgconfig 2.0.3 + getAndInstallFromCRAN png 0.1-8 + getAndInstallFromCRAN praise 1.0.0 + getAndInstallFromCRAN prettyunits 1.2.0 + getAndInstallFromCRAN proxy 0.4-27 + getAndInstallFromCRAN ps 1.7.6 + getAndInstallFromCRAN R.methodsS3 1.8.2 + getAndInstallFromCRAN R6 2.5.1 + getAndInstallFromCRAN randomForest 4.7-1.1 + getAndInstallFromCRAN rappdirs 0.3.3 + getAndInstallFromCRAN RColorBrewer 1.1-3 + getAndInstallFromCRAN Rcpp 1.0.12 + getAndInstallFromCRAN RcppParallel 5.1.7 + getAndInstallFromCRAN remotes 2.5.0 + getAndInstallFromCRAN renv 1.0.7 + getAndInstallFromCRAN RhpcBLASctl 0.23-42 + getAndInstallFromCRAN rlang 1.1.3 + getAndInstallFromCRAN rpart 4.1.23 + getAndInstallFromCRAN rprojroot 2.0.4 + getAndInstallFromCRAN rstudioapi 0.16.0 + getAndInstallFromCRAN RUnit 0.4.33 + getAndInstallFromCRAN shape 1.4.6.1 + getAndInstallFromCRAN slam 0.1-50 + getAndInstallFromCRAN sourcetools 0.1.7-1 + getAndInstallFromCRAN SparseM 1.83 + getAndInstallFromCRAN sparsepp 1.22 + getAndInstallFromCRAN spatial 7.3-17 + getAndInstallFromCRAN statmod 1.5.0 + getAndInstallFromCRAN stringi 1.8.4 + getAndInstallFromCRAN svd 0.5.5 + getAndInstallFromCRAN sys 3.4.2 + getAndInstallFromCRAN tweedie 2.3.5 + getAndInstallFromCRAN utf8 1.2.4 + getAndInstallFromCRAN uuid 1.2-0 + getAndInstallFromCRAN versions 0.3 + getAndInstallFromCRAN viridisLite 0.4.2 + getAndInstallFromCRAN whisker 0.4.1 + getAndInstallFromCRAN withr 3.0.0 + getAndInstallFromCRAN xfun 0.44 + getAndInstallFromCRAN xtable 1.8-4 + getAndInstallFromCRAN yaml 2.3.8 + getAndInstallFromCRAN zip 2.3.1 + getAndInstallFromCRAN checkmate 2.3.1 + getAndInstallFromCRAN PKI 0.1-12 + getAndInstallFromCRAN bit64 4.0.5 + getAndInstallFromCRAN caTools 1.18.2 + getAndInstallFromCRAN RCurl 1.98-1.14 + getAndInstallFromCRAN sessioninfo 1.2.2 + getAndInstallFromCRAN munsell 0.5.1 + getAndInstallFromCRAN diffobj 0.3.5 + getAndInstallFromCRAN robustbase 0.99-2 + getAndInstallFromCRAN lambda.r 1.2.4 + getAndInstallFromCRAN optparse 1.7.5 + getAndInstallFromCRAN foreach 1.5.2 + getAndInstallFromCRAN Matrix 1.7-0 + getAndInstallFromCRAN nlme 3.1-164 + getAndInstallFromCRAN sp 2.1-4 + getAndInstallFromCRAN zoo 1.8-12 + getAndInstallFromCRAN class 7.3-22 + getAndInstallFromCRAN prabclus 2.3-3 + getAndInstallFromCRAN plot3D 1.4.1 + getAndInstallFromCRAN libcoin 1.0-10 + getAndInstallFromCRAN flexmix 2.3-19 + getAndInstallFromCRAN R.oo 1.26.0 + getAndInstallFromCRAN desc 1.4.3 + getAndInstallFromCRAN lgr 0.4.4 + getAndInstallFromCRAN processx 3.8.4 + getAndInstallFromCRAN RcppArmadillo 0.12.8.3.0 + getAndInstallFromCRAN RcppEigen 0.3.4.0.0 + getAndInstallFromCRAN interp 1.1-6 + getAndInstallFromCRAN cachem 1.1.0 + getAndInstallFromCRAN ellipsis 0.3.2 + getAndInstallFromCRAN htmltools 0.5.8.1 + getAndInstallFromCRAN later 1.3.2 + getAndInstallFromCRAN lifecycle 1.0.4 + getAndInstallFromCRAN xml2 1.3.6 + getAndInstallFromCRAN askpass 1.2.0 + getAndInstallFromCRAN highr 0.11 + getAndInstallFromCRAN tinytex 0.51 + getAndInstallFromCRAN gplots 3.1.3.1 + getAndInstallFromCRAN futile.logger 1.4.3 + getAndInstallFromCRAN irlba 2.3.5.1 + getAndInstallFromCRAN MatrixExtra 0.1.15 + getAndInstallFromCRAN mlapi 0.1.1 + getAndInstallFromCRAN survival 3.6-4 + getAndInstallFromCRAN xgboost 1.7.7.1 + getAndInstallFromCRAN mgcv 1.9-1 + getAndInstallFromCRAN ade4 1.7-22 + getAndInstallFromCRAN sandwich 3.1-0 + getAndInstallFromCRAN e1071 1.7-14 + getAndInstallFromCRAN flexclust 1.4-2 + getAndInstallFromCRAN fpc 2.2-12 + getAndInstallFromCRAN R.utils 2.12.3 + getAndInstallFromCRAN callr 3.7.6 + getAndInstallFromCRAN xopen 1.0.1 + getAndInstallFromCRAN latticeExtra 0.6-30 + getAndInstallFromCRAN memoise 2.0.1 + getAndInstallFromCRAN crosstalk 1.2.1 + getAndInstallFromCRAN fontawesome 0.5.2 + getAndInstallFromCRAN jquerylib 0.1.4 + getAndInstallFromCRAN sass 0.4.9 + getAndInstallFromCRAN promises 1.3.0 + getAndInstallFromCRAN gtable 0.3.5 + getAndInstallFromCRAN scales 1.3.0 + getAndInstallFromCRAN systemfonts 1.1.0 + getAndInstallFromCRAN vctrs 0.6.5 + getAndInstallFromCRAN rversions 2.1.2 + getAndInstallFromCRAN urlchecker 1.0.1 + getAndInstallFromCRAN openssl 2.2.0 + getAndInstallFromCRAN knitr 1.47 + getAndInstallFromCRAN ROCR 1.0-11 + getAndInstallFromCRAN rsparse 0.5.1 + getAndInstallFromCRAN gbm 2.1.9 + getAndInstallFromCRAN glmnet 4.1-8 + getAndInstallFromCRAN penalized 0.9-52 + getAndInstallFromCRAN TH.data 1.1-2 + getAndInstallFromCRAN pkgbuild 1.4.4 + getAndInstallFromCRAN webshot 0.5.5 + getAndInstallFromCRAN bslib 0.7.0 + getAndInstallFromCRAN httpuv 1.6.15 + getAndInstallFromCRAN gridExtra 2.3 + getAndInstallFromCRAN textshaping 0.4.0 + getAndInstallFromCRAN downlit 0.4.3 + getAndInstallFromCRAN pillar 1.9.0 + getAndInstallFromCRAN purrr 1.0.2 + getAndInstallFromCRAN stringr 1.5.1 + getAndInstallFromCRAN tidyselect 1.2.1 + getAndInstallFromCRAN credentials 2.0.1 + getAndInstallFromCRAN httr 1.4.7 + getAndInstallFromCRAN httr2 1.0.1 + getAndInstallFromCRAN rsconnect 1.3.0 + getAndInstallFromCRAN tables 0.9.25 + getAndInstallFromCRAN MLmetrics 1.1.3 + getAndInstallFromCRAN text2vec 0.6.4 + getAndInstallFromCRAN multcomp 1.4-25 + getAndInstallFromCRAN pkgload 1.3.4 + getAndInstallFromCRAN rcmdcheck 1.4.0 + getAndInstallFromCRAN rmarkdown 2.27 + getAndInstallFromCRAN shiny 1.8.1.1 + getAndInstallFromCRAN ragg 1.3.2 + getAndInstallFromCRAN repr 1.1.7 + getAndInstallFromCRAN tibble 3.2.1 + getAndInstallFromCRAN gert 2.0.1 + getAndInstallFromCRAN gh 1.4.1 + getAndInstallFromCRAN coin 1.4-3 + getAndInstallFromCRAN roxygen2 7.3.1 + getAndInstallFromCRAN htmlwidgets 1.6.4 + getAndInstallFromCRAN miniUI 0.1.1.1 + getAndInstallFromCRAN shinyjs 2.1.0 + getAndInstallFromCRAN IRdisplay 1.1 + getAndInstallFromCRAN dplyr 1.1.4 + getAndInstallFromCRAN ggplot2 3.5.1 + getAndInstallFromCRAN pkgdown 2.0.9 + getAndInstallFromCRAN rematch2 2.1.2 + getAndInstallFromCRAN usethis 2.2.3 + getAndInstallFromCRAN htmlTable 2.4.2 + getAndInstallFromCRAN profvis 0.3.8 + getAndInstallFromCRAN rgl 1.3.1 + getAndInstallFromCRAN tidyr 1.3.1 + getAndInstallFromCRAN viridis 0.6.5 + getAndInstallFromCRAN waldo 0.5.2 + getAndInstallFromCRAN plot3Drgl 1.0.4 + getAndInstallFromCRAN plotly 4.10.4 + getAndInstallFromCRAN RItools 0.3-3 + getAndInstallFromCRAN Hmisc 5.1-3 + getAndInstallFromCRAN testthat 3.2.1.1 + getAndInstallFromCRAN devtools 2.4.5 + getAndInstallFromCRAN uplift 0.3.5 + getAndInstallFromCRAN DT 0.33 + +else + + getAndInstallFromCRAN abind 1.4-5 + getAndInstallFromCRAN acepack 1.4.1 + getAndInstallFromCRAN AUC 0.3.0 + getAndInstallFromCRAN backports 1.3.0 + getAndInstallFromCRAN base64enc 0.1-3 + getAndInstallFromCRAN bit 4.0.4 + getAndInstallFromCRAN bitops 1.0-7 + getAndInstallFromCRAN boot 1.3-18 + getAndInstallFromCRAN brew 1.0-6 + getAndInstallFromCRAN brio 1.1.2 + getAndInstallFromCRAN clipr 0.7.1 + getAndInstallFromCRAN cluster 2.0.5 + getAndInstallFromCRAN codetools 0.2-15 + getAndInstallFromCRAN colorspace 2.0-2 + getAndInstallFromCRAN commonmark 1.7 + getAndInstallFromCRAN cpp11 0.4.1 + getAndInstallFromCRAN crayon 1.4.2 + getAndInstallFromCRAN curl 4.3.2 + getAndInstallFromCRAN data.table 1.14.2 + getAndInstallFromCRAN DEoptimR 1.0-9 + getAndInstallFromCRAN digest 0.6.28 + getAndInstallFromCRAN diptest 0.76-0 + getAndInstallFromCRAN evaluate 0.14 + getAndInstallFromCRAN fansi 0.5.0 + getAndInstallFromCRAN farver 2.1.0 + getAndInstallFromCRAN fastmap 1.1.0 + getAndInstallFromCRAN foreign 0.8-67 + getAndInstallFromCRAN formatR 1.11 + getAndInstallFromCRAN Formula 1.2-4 + getAndInstallFromCRAN fs 1.5.0 + getAndInstallFromCRAN futile.options 1.0.1 + getAndInstallFromCRAN generics 0.1.1 + getAndInstallFromCRAN getopt 1.20.3 + getAndInstallFromCRAN gitcreds 0.1.1 + getAndInstallFromCRAN glue 1.5.0 + getAndInstallFromCRAN gtable 0.3.0 + getAndInstallFromCRAN gtools 3.9.2 + getAndInstallFromCRAN HDtweedie 1.1 + getAndInstallFromCRAN highlight 0.5.0 + getAndInstallFromCRAN ini 0.3.1 + getAndInstallFromCRAN isoband 0.2.5 + getAndInstallFromCRAN iterators 1.0.13 + getAndInstallFromCRAN jsonlite 1.7.2 + getAndInstallFromCRAN kernlab 0.9-29 + getAndInstallFromCRAN KernSmooth 2.23-15 + getAndInstallFromCRAN labeling 0.4.2 + getAndInstallFromCRAN lattice 0.20-34 + getAndInstallFromCRAN lazyeval 0.2.2 + getAndInstallFromCRAN LiblineaR 1.94-2 + getAndInstallFromCRAN magrittr 2.0.1 + getAndInstallFromCRAN MASS 7.3-45 + getAndInstallFromCRAN mclust 5.4.8 + getAndInstallFromCRAN mime 0.12 + getAndInstallFromCRAN misc3d 0.9-1 + getAndInstallFromCRAN mlbench 2.1-3 + getAndInstallFromCRAN MLmetrics 1.0.0 + getAndInstallFromCRAN modeltools 0.2-23 + getAndInstallFromCRAN mvtnorm 1.0-0 + getAndInstallFromCRAN nnet 7.3-12 + getAndInstallFromCRAN packrat 0.7.0 + getAndInstallFromCRAN pixmap 0.4-12 + getAndInstallFromCRAN pkgconfig 2.0.3 + getAndInstallFromCRAN praise 1.0.0 + getAndInstallFromCRAN prettyunits 1.1.1 + getAndInstallFromCRAN proxy 0.4-20 + getAndInstallFromCRAN ps 1.6.0 + getAndInstallFromCRAN R.methodsS3 1.8.1 + getAndInstallFromCRAN R6 2.5.1 + getAndInstallFromCRAN randomForest 4.6-14 + getAndInstallFromCRAN rappdirs 0.3.3 + getAndInstallFromCRAN RColorBrewer 1.1-2 + getAndInstallFromCRAN Rcpp 1.0.12 + getAndInstallFromCRAN RcppParallel 5.1.4 + getAndInstallFromCRAN remotes 2.4.1 + getAndInstallFromCRAN rlang 1.0.0 + getAndInstallFromCRAN rpart 4.1-10 + getAndInstallFromCRAN rprojroot 2.0.2 + getAndInstallFromCRAN rstudioapi 0.13 + getAndInstallFromCRAN RUnit 0.4.32 + getAndInstallFromCRAN slam 0.1-40 + getAndInstallFromCRAN sourcetools 0.1.7 + getAndInstallFromCRAN SparseM 1.81 + getAndInstallFromCRAN sparsepp 1.22 + getAndInstallFromCRAN spatial 7.3-11 + getAndInstallFromCRAN statmod 1.4.36 + getAndInstallFromCRAN stringi 1.7.5 + getAndInstallFromCRAN svd 0.5 + getAndInstallFromCRAN sys 3.4 + getAndInstallFromCRAN systemfonts 0.2.3 + getAndInstallFromCRAN tweedie 2.3.5 + getAndInstallFromCRAN utf8 1.2.2 + getAndInstallFromCRAN uuid 1.0-3 + getAndInstallFromCRAN versions 0.3 + getAndInstallFromCRAN viridisLite 0.4.0 + getAndInstallFromCRAN whisker 0.4 + getAndInstallFromCRAN withr 2.4.2 + getAndInstallFromCRAN xfun 0.28 + getAndInstallFromCRAN xml2 1.3.2 + getAndInstallFromCRAN xtable 1.8-4 + getAndInstallFromCRAN yaml 2.2.1 + getAndInstallFromCRAN zip 2.2.0 + getAndInstallFromCRAN checkmate 2.0.0 + getAndInstallFromCRAN bit64 4.0.5 + getAndInstallFromCRAN caTools 1.17.1.4 + getAndInstallFromCRAN RCurl 1.95-4.12 + getAndInstallFromCRAN munsell 0.5.0 + getAndInstallFromCRAN diffobj 0.3.5 + getAndInstallFromCRAN robustbase 0.93-7 + getAndInstallFromCRAN lambda.r 1.2.4 + getAndInstallFromCRAN optparse 1.7.1 + getAndInstallFromCRAN cli 3.1.0 + getAndInstallFromCRAN gridExtra 2.3 + getAndInstallFromCRAN foreach 1.5.1 + getAndInstallFromCRAN Matrix 1.2-8 + getAndInstallFromCRAN nlme 3.1-131 + getAndInstallFromCRAN sp 1.4-5 + getAndInstallFromCRAN class 7.3-14 + getAndInstallFromCRAN prabclus 2.3-2 + getAndInstallFromCRAN plot3D 1.4 + getAndInstallFromCRAN flexmix 2.3-17 + getAndInstallFromCRAN R.oo 1.24.0 + getAndInstallFromCRAN processx 3.5.2 + getAndInstallFromCRAN latticeExtra 0.6-28 + getAndInstallFromCRAN RcppArmadillo 0.10.7.3.0 + getAndInstallFromCRAN cachem 1.0.6 + getAndInstallFromCRAN ellipsis 0.3.2 + getAndInstallFromCRAN htmltools 0.5.2 + getAndInstallFromCRAN later 1.3.0 + getAndInstallFromCRAN lifecycle 1.0.1 + getAndInstallFromCRAN purrr 0.3.4 + getAndInstallFromCRAN desc 1.4.0 + getAndInstallFromCRAN stringr 1.4.0 + getAndInstallFromCRAN askpass 1.1 + getAndInstallFromCRAN highr 0.9 + getAndInstallFromCRAN tinytex 0.35 + getAndInstallFromCRAN rversions 2.1.1 + getAndInstallFromCRAN gplots 3.1.1 + getAndInstallFromCRAN futile.logger 1.4.3 + getAndInstallFromCRAN sessioninfo 1.2.1 + getAndInstallFromCRAN glmnet 2.0-2 + getAndInstallFromCRAN irlba 2.3.3 + getAndInstallFromCRAN survival 2.44-1.1 + getAndInstallFromCRAN xgboost 1.0.0.2 + getAndInstallFromCRAN mgcv 1.8-17 + getAndInstallFromCRAN ade4 1.7-18 + getAndInstallFromCRAN e1071 1.7-9 + getAndInstallFromCRAN flexclust 1.4-0 + getAndInstallFromCRAN fpc 2.2-9 + getAndInstallFromCRAN R.utils 2.11.0 + getAndInstallFromCRAN callr 3.7.0 + getAndInstallFromCRAN xopen 1.0.0 + getAndInstallFromCRAN memoise 2.0.0 + getAndInstallFromCRAN vctrs 0.3.8 + getAndInstallFromCRAN crosstalk 1.2.0 + getAndInstallFromCRAN fontawesome 0.2.2 + getAndInstallFromCRAN htmlwidgets 1.5.4 + getAndInstallFromCRAN jquerylib 0.1.4 + getAndInstallFromCRAN sass 0.4.0 + getAndInstallFromCRAN promises 1.2.0.1 + getAndInstallFromCRAN scales 1.1.1 + getAndInstallFromCRAN pkgload 1.2.3 + getAndInstallFromCRAN openssl 1.4.5 + getAndInstallFromCRAN knitr 1.36 + getAndInstallFromCRAN ROCR 1.0-7 + getAndInstallFromCRAN text2vec 0.5.0 + getAndInstallFromCRAN coin 1.0-0 + getAndInstallFromCRAN gbm 2.1.3 + getAndInstallFromCRAN penalized 0.9-51 + getAndInstallFromCRAN RItools 0.1-17 + getAndInstallFromCRAN pkgbuild 1.2.0 + getAndInstallFromCRAN webshot 0.5.2 + getAndInstallFromCRAN pillar 1.6.4 + getAndInstallFromCRAN tidyselect 1.1.1 + getAndInstallFromCRAN bslib 0.3.1 + getAndInstallFromCRAN httpuv 1.6.3 + getAndInstallFromCRAN credentials 1.3.0 + getAndInstallFromCRAN httr 1.4.2 + getAndInstallFromCRAN rsconnect 0.8.24 + getAndInstallFromCRAN htmlTable 2.3.0 + getAndInstallFromCRAN rmarkdown 2.11 + getAndInstallFromCRAN roxygen2 7.2.2 + getAndInstallFromCRAN tables 0.9.6 + getAndInstallFromCRAN rcmdcheck 1.4.0 + getAndInstallFromCRAN repr 1.1.3 + getAndInstallFromCRAN tibble 3.1.6 + getAndInstallFromCRAN shiny 1.7.1 + getAndInstallFromCRAN gert 1.3.0 + getAndInstallFromCRAN gh 1.3.0 + getAndInstallFromCRAN uplift 0.3.5 + getAndInstallFromCRAN IRdisplay 1.0 + getAndInstallFromCRAN dplyr 1.0.7 + getAndInstallFromCRAN ggplot2 3.3.5 + getAndInstallFromCRAN rematch2 2.1.2 + getAndInstallFromCRAN miniUI 0.1.1.1 + getAndInstallFromCRAN shinyjs 2.0.0 + getAndInstallFromCRAN usethis 2.0.1 + getAndInstallFromCRAN tidyr 1.1.4 + getAndInstallFromCRAN viridis 0.6.2 + getAndInstallFromCRAN pkgdown 1.5.1 + getAndInstallFromCRAN waldo 0.3.1 + getAndInstallFromCRAN manipulateWidget 0.11.1 + getAndInstallFromCRAN plotly 4.10.0 + getAndInstallFromCRAN Hmisc 4.3-0 + getAndInstallFromCRAN testthat 3.1.0 + getAndInstallFromCRAN rgl 0.100.54 + getAndInstallFromCRAN devtools 2.4.2 + getAndInstallFromCRAN plot3Drgl 1.0.2 +fi # dependecies from GitHub R_REMOTES_UPGRADE=never /usr/local/R/current/bin/R -e "chooseCRANmirror(graphics=FALSE, ind=1); library(devtools); \ diff --git a/h2o-r/h2o-package/R/config.R b/h2o-r/h2o-package/R/config.R index e1ab833742a6..1fa754fc0cae 100644 --- a/h2o-r/h2o-package/R/config.R +++ b/h2o-r/h2o-package/R/config.R @@ -88,7 +88,7 @@ ini_to_df = ini_to_df[,names] ini_to_df = data.frame(ini_to_df) colnames(ini_to_df) <- names - ini_to_df <- data.frame(lapply(ini_to_df, trimws)) + ini_to_df <- data.frame(lapply(ini_to_df, trimws), stringsAsFactors = TRUE) return(ini_to_df) } @@ -110,7 +110,7 @@ } ini_to_df = subset(ini_to_df,select = names) colnames(ini_to_df) <- names - ini_to_df <- data.frame(lapply(ini_to_df, trimws)) + ini_to_df <- data.frame(lapply(ini_to_df, trimws), stringsAsFactors = TRUE) return(ini_to_df) } diff --git a/h2o-r/h2o-package/R/explain.R b/h2o-r/h2o-package/R/explain.R index 2243388bbdb7..67220f3a323e 100644 --- a/h2o-r/h2o-package/R/explain.R +++ b/h2o-r/h2o-package/R/explain.R @@ -242,10 +242,10 @@ case_insensitive_match_arg <- function(arg, choices) { .self }, get_model = function(model_id) { - model <- memoised_models$get_model(model_id) - if (!is.null(model@allparameters$treatment_column)) + m <- memoised_models$get_model(model_id) + if (!is.null(m@allparameters$treatment_column)) stop("Uplift models have not supported in explain yet.") - return(model) + return(m) } ) ) diff --git a/h2o-r/scripts/h2o-r-test-setup.R b/h2o-r/scripts/h2o-r-test-setup.R index 6bd0e25d851f..9fbcecca52a9 100755 --- a/h2o-r/scripts/h2o-r-test-setup.R +++ b/h2o-r/scripts/h2o-r-test-setup.R @@ -2,7 +2,6 @@ .origEchoValue <- getOption("echo") options(echo=FALSE) options(scipen=999) -options(stringsAsFactors=T) #' #' diff --git a/h2o-r/tests/runitUtils/shared_javapredict.R b/h2o-r/tests/runitUtils/shared_javapredict.R index 661cbbef6bc8..54ba6a17cc72 100644 --- a/h2o-r/tests/runitUtils/shared_javapredict.R +++ b/h2o-r/tests/runitUtils/shared_javapredict.R @@ -68,7 +68,7 @@ doJavapredictTest <- function(model,test_file,test_frame,params, separator=",", safeSystem(cmd) print("Comparing predictions between H2O and Java POJO") - prediction2 <- read.csv(sprintf("%s/out_pojo.csv", tmpdir_name), header=T) + prediction2 <- read.csv(sprintf("%s/out_pojo.csv", tmpdir_name), header=T, stringsAsFactors=TRUE) if (nrow(prediction1) != nrow(prediction2)) { warning("Prediction mismatch") print(paste("Rows from H2O", nrow(prediction1))) diff --git a/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance.R b/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance.R index 5ce5f56ebada..dfc606f794d3 100644 --- a/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance.R +++ b/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance.R @@ -15,11 +15,12 @@ test.CoxPH.concordance <- function() { rModel <- coxph(Surv(time, status) ~ age + sex + meal.cal + age:meal.cal, data = tstdata, ties = "efron") rPredictor <- rModel$linear.predictors + hexModel <- h2o.coxph(x = c("age", "sex", "meal.cal"), interaction_pairs = list(c("age", "meal.cal")), event_column = "status", stop_column = "time", ties = "efron", training_frame = tstdataHex) hexPredictor <- pred(hexModel, tstdataHex) - - expect_equal(rPredictor, hexPredictor, scale = 1, tolerance = 1e-3) + + expect_equal(rPredictor - mean(rPredictor), hexPredictor, scale = 1, tolerance = 1e-3) rConcordance <- unname(summary(rModel)$concordance)[1] hexConcordance <- h2o.performance(hexModel, data=tstdataHex)@metrics$concordance diff --git a/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance_heart.R b/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance_heart.R index ce2f0fcb5918..cce60312a173 100644 --- a/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance_heart.R +++ b/h2o-r/tests/testdir_algos/coxph/runit_coxph_concordance_heart.R @@ -26,7 +26,7 @@ test.CoxPH.predict <- function() { check.pred <- function(r.model, hex.model, r.tstdata, hex.tstdata) { fit.pred <- pred.r(r.model, r.tstdata) hex.lp <- pred.h2o(hex.model, hex.tstdata) - expect_equal(fit.pred, hex.lp, tolerance = 1e-5, scale = 1) + expect_equal(fit.pred - mean(fit.pred), hex.lp, tolerance = 1e-5, scale = 1) } check.concordance <- function (rModel, hexModel, data, tolerance = 1e-3) { diff --git a/h2o-r/tests/testdir_algos/coxph/runit_coxph_predict.R b/h2o-r/tests/testdir_algos/coxph/runit_coxph_predict.R index ced349a5ef72..64edb3092f6d 100644 --- a/h2o-r/tests/testdir_algos/coxph/runit_coxph_predict.R +++ b/h2o-r/tests/testdir_algos/coxph/runit_coxph_predict.R @@ -16,7 +16,10 @@ pred.h2o <- function(model, data) { compare.results <- function(fit, hex.fit, tstdata, tstdata.hex) { fit.pred <- pred.r(fit, tstdata) hex.lp <- pred.h2o(hex.fit, tstdata.hex) - expect_equal(fit.pred, hex.lp, tolerance = 1e-7, scale = 1) + w <- tstdata$weights + if (is.null(w)) + w <- rep_len(1, length(fit.pred)) + expect_equal(fit.pred - weighted.mean(fit.pred, w, na.rm=TRUE), hex.lp, tolerance = 1e-7, scale = 1) } cancer.with.sex <- function () { diff --git a/h2o-r/tests/testdir_algos/coxph/runit_pubdev_8945_coxph_all_interactions_mojo.R b/h2o-r/tests/testdir_algos/coxph/runit_pubdev_8945_coxph_all_interactions_mojo.R index cbd36d6f3259..0982925868c3 100644 --- a/h2o-r/tests/testdir_algos/coxph/runit_pubdev_8945_coxph_all_interactions_mojo.R +++ b/h2o-r/tests/testdir_algos/coxph/runit_pubdev_8945_coxph_all_interactions_mojo.R @@ -10,7 +10,6 @@ test.CoxPH.mojo_interactions_impl <- function(stratify_by = NULL) { interaction_pairs = list(c("C1", "C3"), c("C1", "C2"), c("C3", "C4"), c("C4", "C2"), c("C1", "age"), c("surgery", "C3")), training_frame = training_frame) - browser() predict_h2o <- h2o.predict(coxph_h2o, training_frame) print(predict_h2o) @@ -21,7 +20,6 @@ test.CoxPH.mojo_interactions_impl <- function(stratify_by = NULL) { predict_mojo <- h2o.predict(coxph_mojo, training_frame) print(predict_mojo) - browser() expect_equal(as.data.frame(predict_h2o), as.data.frame(predict_mojo)) } diff --git a/h2o-r/tests/testdir_algos/gbm/runit_GBM_ecology.R b/h2o-r/tests/testdir_algos/gbm/runit_GBM_ecology.R index b34586373496..accf63f09824 100644 --- a/h2o-r/tests/testdir_algos/gbm/runit_GBM_ecology.R +++ b/h2o-r/tests/testdir_algos/gbm/runit_GBM_ecology.R @@ -40,7 +40,7 @@ test.GBM.ecology <- function() { print(ecology.sum) #import csv data for R to use - ecology.data <- read.csv(locate("smalldata/gbm_test/ecology_model.csv"), header = TRUE) + ecology.data <- read.csv(locate("smalldata/gbm_test/ecology_model.csv"), header = TRUE, stringsAsFactors=TRUE) ecology.data <- na.omit(ecology.data) #this omits NAs... does GBM do this? Perhaps better to model w/o doing this? Log.info("H2O GBM with parameters:\nntrees = 100, max_depth = 5, min_rows = 10, learn_rate = 0.1\n") diff --git a/h2o-r/tests/testdir_algos/gbm/runit_GBM_weight_gamma.R b/h2o-r/tests/testdir_algos/gbm/runit_GBM_weight_gamma.R index 29077cae8f5a..14101d3b5c3a 100644 --- a/h2o-r/tests/testdir_algos/gbm/runit_GBM_weight_gamma.R +++ b/h2o-r/tests/testdir_algos/gbm/runit_GBM_weight_gamma.R @@ -16,16 +16,15 @@ test <- function() { #htable= as.h2o(table.1.2,destination_frame = "htable") hh = h2o.gbm(x = 1:3,y = "medskad",training_frame = htable,distribution = "gamma",weights_column = "antskad", ntrees = 20,max_depth = 1,min_rows = 1,learn_rate = 1) - ph = as.vector(as.data.frame(h2o.predict(hh,newdata = htable))) - + ph = as.data.frame(h2o.predict(hh,newdata = htable))$predict #expect_equal(gg$initF,hh@model$init_f,tolerance = 1e-6) - #expect_equal(min(pr),min(ph[,1]),tolerance = 1e-6) - #expect_equal(max(pr),max(ph[,1]),tolerance = 1e-6) - #expect_equal(mean(pr),mean(ph[,1]),tolerance = 1e-6) + #expect_equal(min(pr),min(ph),tolerance = 1e-6) + #expect_equal(max(pr),max(ph),tolerance = 1e-6) + #expect_equal(mean(pr),mean(ph),tolerance = 1e-6) expect_equal(8.804447,hh@model$init_f,tolerance = 1e-6) - expect_equal(3751.01,min(ph[,1]),tolerance = 1e-4) - expect_equal(15291,max(ph[,1]),tolerance = 1e-4) - expect_equal(8119,mean(ph[,1]),tolerance = 1e-4) + expect_equal(3751.01,min(ph),tolerance = 1e-4) + expect_equal(15291,max(ph),tolerance = 1e-4) + expect_equal(8119,mean(ph),tolerance = 1e-4) } diff --git a/h2o-r/tests/testdir_algos/glm/runit_GLM_libR_airlines.R b/h2o-r/tests/testdir_algos/glm/runit_GLM_libR_airlines.R index ecfe7314453e..ad4ec4b0cf32 100644 --- a/h2o-r/tests/testdir_algos/glm/runit_GLM_libR_airlines.R +++ b/h2o-r/tests/testdir_algos/glm/runit_GLM_libR_airlines.R @@ -13,6 +13,8 @@ test.LiblineaR.airlines <- function() { Log.info("epsilon = 1E-4: Tolerance of termination criterion\n") Log.info(" cross = 0: No kfold cross-validation\n") + dimnames(test) <- dimnames(train) + LibR.m <- LiblineaR(train, trainLabels,type=0, epsilon=1E-4, cost=100) LibRpreds <- predict(LibR.m, test, proba=1, decisionValues=TRUE) LibRCM <- table(testLabels, LibRpreds$predictions) diff --git a/h2o-r/tests/testdir_algos/glm/runit_GLM_offset.R b/h2o-r/tests/testdir_algos/glm/runit_GLM_offset.R index a40c585049ac..32d877981868 100644 --- a/h2o-r/tests/testdir_algos/glm/runit_GLM_offset.R +++ b/h2o-r/tests/testdir_algos/glm/runit_GLM_offset.R @@ -26,7 +26,7 @@ test <- function() { hh = h2o.glm(x = 2:31,y = 1,training_frame = frm,family = "binomial",offset_column = "off",lambda = 0) gr = glm(formula = y~X1+X2 + X3 +X4 +X5+X6+X7+X8+X9+X10+ X11+X12+X13+X14+X15+X16+X17+X18+X19+ X20+X21+X22+X23+X24+X25+X26+X27+X28+X29+X30, family = "binomial",data = rfm,offset= rfm[,32]) - gg = glmnet(x = as.matrix(rfm[,-c(1,32)]),y = as.factor(rfm[,1]),family = "binomial",lambda =0,offse = rfm[,32]) + gg = glmnet(x = as.matrix(rfm[,-c(1,32)]),y = as.factor(rfm[,1]),family = "binomial",lambda =0, offset = rfm[,32]) print("compare results") expect_equal(gr$null.deviance, hh@model$training_metrics@metrics$null_deviance) expect_equal(gr$aic, hh@model$training_metrics@metrics$AIC,tolerance = 0.00001) @@ -34,7 +34,7 @@ test <- function() { expect_equal(gr$df.residual,hh@model$training_metrics@metrics$residual_degrees_of_freedom) #predictions ph = h2o.predict(object = hh,newdata = val) - pr = predict(object = gg,newx = as.matrix(valid[,-c(1,32)]),offset = as.matrix(valid[,32]),type = "response") + pr = predict(object = gg,newx = as.matrix(valid[,-c(1,32)]), newoffset = as.matrix(valid[,32]), offset = as.matrix(valid[,32]),type = "response") print("compare predictions") expect_equal(min(pr),min(ph$p1),tolerance = 0.0001) expect_equal(max(pr),max(ph$p1),tolerance = 0.0001) @@ -49,7 +49,7 @@ test <- function() { expect_equal(deviance(gg),hh@model$training_metrics@metrics$residual_deviance,tolerance = 0.00001) #predictions ph = h2o.predict(object = hh,newdata = val) - pr = predict(object = gg,newx = as.matrix(valid[,-c(1,32)]),offset = as.matrix(valid[,32]),type = "response") + pr = predict(object = gg,newx = as.matrix(valid[,-c(1,32)]), newoffset = as.matrix(valid[,32]), offset = as.matrix(valid[,32]),type = "response") print("compare predictions") expect_equal(min(pr),min(ph$p1),tolerance = 0.0001) expect_equal(max(pr),max(ph$p1),tolerance = 0.0001) diff --git a/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_6037_fractionalbinomial_mojo.R b/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_6037_fractionalbinomial_mojo.R index 7c5d9517f050..a01cad170895 100644 --- a/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_6037_fractionalbinomial_mojo.R +++ b/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_6037_fractionalbinomial_mojo.R @@ -9,14 +9,13 @@ test.fractionalbinomial <- # Run the test #---------------------------------------------------------------------- - browser() params_prob_data <- setParmsData() # generate model parameters, random dataset modelAndDir<-buildModelSaveMojoGLM(params_prob_data$params) # build the model and save mojo filename = sprintf("%s/in.csv", modelAndDir$dirName) # save the test dataset into a in.csv file. h2o.downloadCSV(params_prob_data$tDataset[,params_prob_data$params$x], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-4) } diff --git a/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_8638_bodyfat_RID_Binomial_compareR_test.R b/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_8638_bodyfat_RID_Binomial_compareR_test.R index b851c081610c..24cdef51e822 100644 --- a/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_8638_bodyfat_RID_Binomial_compareR_test.R +++ b/h2o-r/tests/testdir_algos/glm/runit_PUBDEV_8638_bodyfat_RID_Binomial_compareR_test.R @@ -9,7 +9,6 @@ source("../../../scripts/h2o-r-test-setup.R") test_RID_binomial_compareR <- function() { fat <- h2o.importFile(locate("smalldata/glm_test/bodyfat.csv")) bodyfat <- as.data.frame(fat) - browser() rGlmBinomial <- glm(bmi ~ neck+density+hip, data=bodyfat, family=binomial()) dfbetasGlmB <- dfbetas(rGlmBinomial) hGlmBinomial <- h2o.glm(x=c("neck", "density", "hip"), y="bmi", lambda=0, family="binomial", standardize=FALSE, influence="dfbetas", training_frame=fat) diff --git a/h2o-r/tests/testdir_algos/glrm/runit_glrm_PUBDEV_3788_loss_by_col_err.R b/h2o-r/tests/testdir_algos/glrm/runit_glrm_PUBDEV_3788_loss_by_col_err.R index 158d91fb0d2c..f6aba8b57eec 100644 --- a/h2o-r/tests/testdir_algos/glrm/runit_glrm_PUBDEV_3788_loss_by_col_err.R +++ b/h2o-r/tests/testdir_algos/glrm/runit_glrm_PUBDEV_3788_loss_by_col_err.R @@ -7,12 +7,11 @@ test.glrm.pubdev.3788 <- function() { # Create data frame with a constant column data <- data.frame('NumericCol' = runif(50), 'ConstantCol' = rep(1, 50), - 'CategoricalCol' = sample(c("A", "B", "C", "D"), size = 50, replace = T)) + 'CategoricalCol' = sample(c("A", "B", "C", "D"), size = 50, replace = T), + stringsAsFactors = TRUE) data <- as.h2o(data) - browser() - # Specify loss by column and set ignore_const_cols to TRUE glrm_model <- h2o.glrm(data, k = 2, model_id = "glrm_test.hex", loss_by_col = c("Quadratic", "Categorical", "Categorical"), diff --git a/h2o-r/tests/testdir_algos/isofor/runit_isofor_accuracy.R b/h2o-r/tests/testdir_algos/isofor/runit_isofor_accuracy.R index de11ada0ccea..dceff0de9ca1 100644 --- a/h2o-r/tests/testdir_algos/isofor/runit_isofor_accuracy.R +++ b/h2o-r/tests/testdir_algos/isofor/runit_isofor_accuracy.R @@ -4,15 +4,15 @@ source("../../../scripts/h2o-r-test-setup.R") test.IsolationForest.accuracy <- function() { - set.seed(1234) + set.seed(12345) N = 1e6 random_data <- data.frame( x = c(rnorm(N, 0, 0.5), rnorm(N*0.05, -2, 1)), y = c(rnorm(N, 0, 0.5), rnorm(N*0.05, 2, 1)), - outlier = c(rep("NO", N), rep("YES", (0.05*N))) + outlier = c(rep("NO", N), rep("YES", (0.05*N))), + stringsAsFactors = TRUE ) random_data.hex <- as.h2o(random_data) - # different approach than in the paper - build a smaller number of deeper trees trained on a much larger sample h2o_isolation_forest <- h2o.isolationForest(x = c("x", "y"), training_frame = random_data.hex[, c("x", "y")], ntrees = 25, seed = 1234, sample_rate = 0.7, min_rows = 1000, max_depth = 16) diff --git a/h2o-r/tests/testdir_algos/modelselection/runit_PUBDEV_8235_modelselection_gaussian_validation.R b/h2o-r/tests/testdir_algos/modelselection/runit_PUBDEV_8235_modelselection_gaussian_validation.R index b480a1d3551f..ae25a0f41b9e 100644 --- a/h2o-r/tests/testdir_algos/modelselection/runit_PUBDEV_8235_modelselection_gaussian_validation.R +++ b/h2o-r/tests/testdir_algos/modelselection/runit_PUBDEV_8235_modelselection_gaussian_validation.R @@ -6,7 +6,7 @@ testModelSelectionV <- function() { bhexFV2 <- h2o.uploadFile(locate("smalldata/logreg/prostate.csv")) Y <- "GLEASON" X <- c("AGE","RACE","CAPSULE","DCAPS","PSA","VOL","DPROS") - browser() + Log.info("Build the MaxRGLM model") allsubsetsModel <- h2o.modelSelection(y=Y, x=X, seed=12345, training_frame = bhexFV, max_predictor_number=2, mode="allsubsets") diff --git a/h2o-r/tests/testdir_algos/pca/runit_OLD_1079_airlines.R b/h2o-r/tests/testdir_algos/pca/runit_OLD_1079_airlines.R index 893f1ccc31a5..856cb38eeb63 100644 --- a/h2o-r/tests/testdir_algos/pca/runit_OLD_1079_airlines.R +++ b/h2o-r/tests/testdir_algos/pca/runit_OLD_1079_airlines.R @@ -3,7 +3,6 @@ source("../../../scripts/h2o-r-test-setup.R") # Make sure we can run with airline data test.pca.airline<- function() { - browser() dimD = 234 pp = h2o.uploadFile(locate("smalldata/airlines/AirlinesTest.csv.zip")) aa = h2o.prcomp(pp, k=dimD, transform="STANDARDIZE") diff --git a/h2o-r/tests/testdir_algos/pca/runit_pubdev_3502_pca_hangs_large_NOPASS.R b/h2o-r/tests/testdir_algos/pca/runit_pubdev_3502_pca_hangs_large_NOPASS.R index 41f6e6ca6cca..b151260dba8a 100644 --- a/h2o-r/tests/testdir_algos/pca/runit_pubdev_3502_pca_hangs_large_NOPASS.R +++ b/h2o-r/tests/testdir_algos/pca/runit_pubdev_3502_pca_hangs_large_NOPASS.R @@ -9,7 +9,6 @@ test.pca.la1s <- function() { run_time_c <- c() num_run <- 1 - browser() dataR <- h2o.importFile(locate("bigdata/laptop/jira/la1s.wc.arff.txt.zip"), sep = ',', destination_frame = "data", header = T, parse = FALSE) data <- h2o.parseRaw(dataR, destination_frame = "bigParse", parse_type = "CSV", header = T) # chunk_size = 124022500 size will make one chunk. diff --git a/h2o-r/tests/testdir_algos/pca/runit_pubdev_6817_noK_PCA.R b/h2o-r/tests/testdir_algos/pca/runit_pubdev_6817_noK_PCA.R index e4774d4048d8..fac014a57764 100644 --- a/h2o-r/tests/testdir_algos/pca/runit_pubdev_6817_noK_PCA.R +++ b/h2o-r/tests/testdir_algos/pca/runit_pubdev_6817_noK_PCA.R @@ -6,7 +6,6 @@ test.pca.arrests <- function() { Log.info("Importing USArrests.csv data...\n") arrests.hex <- h2o.uploadFile(locate("smalldata/pca_test/USArrests.csv")) arrests.pca.h2o <- h2o.prcomp(training_frame = arrests.hex, k = 1, seed=12345) - browser() pca_noK <- h2o.prcomp(training_frame = arrests.hex, seed=12345) pred1 <- h2o.predict(arrests.pca.h2o, arrests.hex) diff --git a/h2o-r/tests/testdir_golden/runit_pca_5_golden.R b/h2o-r/tests/testdir_golden/runit_pca_5_golden.R index b312391c63b1..d0fa3e841aa3 100644 --- a/h2o-r/tests/testdir_golden/runit_pca_5_golden.R +++ b/h2o-r/tests/testdir_golden/runit_pca_5_golden.R @@ -5,7 +5,7 @@ source("../../scripts/h2o-r-test-setup.R") test.poison.golden <- function() { Log.info("Importing poison.csv data...") - poisonR <- read.csv(locate("smalldata/pca_test/poison.csv"), header = TRUE) + poisonR <- read.csv(locate("smalldata/pca_test/poison.csv"), header = TRUE, stringsAsFactors = TRUE) poisonH2O <- h2o.uploadFile(locate("smalldata/pca_test/poison.csv"), destination_frame = "poisonH2O") k_test <- sort(sample(1:8,3)) diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5008_ordinal_glm_mojo_large.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5008_ordinal_glm_mojo_large.R index e6088d867185..92ced338b1d2 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5008_ordinal_glm_mojo_large.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5008_ordinal_glm_mojo_large.R @@ -15,7 +15,7 @@ test.ordinalGlm.mojo <- h2o.downloadCSV(params_prob_data$tDataset[,params_prob_data$params$x], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-4) } diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5303_multinomial_glm_mojo_large.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5303_multinomial_glm_mojo_large.R index 548675cbf166..affa516fb7f8 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5303_multinomial_glm_mojo_large.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5303_multinomial_glm_mojo_large.R @@ -15,7 +15,7 @@ test.multinomialGlm.mojo <- h2o.downloadCSV(params_prob_data$tDataset[,params_prob_data$params$x], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-4) } diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5355_binomial_glm_mojo_large.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5355_binomial_glm_mojo_large.R index 15f58343b0f4..f6695a8c9fad 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5355_binomial_glm_mojo_large.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5355_binomial_glm_mojo_large.R @@ -15,7 +15,7 @@ test.ordinalGlm.mojo <- h2o.downloadCSV(params_prob_data$tDataset[,params_prob_data$params$x], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-4) } diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5529_leaf_node_assign_gbm_mojo.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5529_leaf_node_assign_gbm_mojo.R index 64fb8ed18062..d899777e056e 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5529_leaf_node_assign_gbm_mojo.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_5529_leaf_node_assign_gbm_mojo.R @@ -16,7 +16,6 @@ test.gbm.leaf.assignment.mojo <- h2o.downloadCSV(params_prob_data$tDataset[,params_prob_data$params$x], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename, get_leaf_node_assignment=TRUE) # perform H2O and mojo prediction and return frames print("Finished mojo. Going to compare two frames") - browser() print(twoFrames) compareStringFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1) }, error = function(x) x) diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_binomial_gam_mojo_large.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_binomial_gam_mojo_large.R index 3f950ad67e2f..aee634d0ac2a 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_binomial_gam_mojo_large.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_binomial_gam_mojo_large.R @@ -20,7 +20,7 @@ test.binomial.gam.mojo <- h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) h2o.downloadCSV(twoFrames$mojoPredict, - sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames( twoFrames$h2oPredict, twoFrames$mojoPredict, diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_quasibinomial_gam_MOJO.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_quasibinomial_gam_MOJO.R index 8a6fd74918c1..93b1b0e02748 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_quasibinomial_gam_MOJO.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7185_quasibinomial_gam_MOJO.R @@ -41,7 +41,7 @@ test.GAM.quasibinomial <- function() { h2o.downloadCSV(htest[1:100, x], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename, col.types=c("enum", "numeric", "numeric")) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) twoFrames$h2oPredict[,1] <- h2o.asfactor(twoFrames$h2oPredict[,1]) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-6) } diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7860_binomial_gam_TP_CS_MOJO.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7860_binomial_gam_TP_CS_MOJO.R index 8d2045e9a0cd..4de31d3874c4 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7860_binomial_gam_TP_CS_MOJO.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_7860_binomial_gam_TP_CS_MOJO.R @@ -26,7 +26,7 @@ test.GAM.binomial <- function() { h2o.downloadCSV(test, filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename, col.types=c("enum", "numeric", "numeric")) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) twoFrames$h2oPredict[,1] <- h2o.asfactor(twoFrames$h2oPredict[,1]) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-6) } diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_fractionalbinomial_glm_MOJO_offset.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_fractionalbinomial_glm_MOJO_offset.R index 1e5d5b7151e4..507b769fe917 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_fractionalbinomial_glm_MOJO_offset.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_fractionalbinomial_glm_MOJO_offset.R @@ -23,7 +23,7 @@ test.GLM.offset.fractionalbinomial <- function() { h2o.downloadCSV(hf[1:100, xOffset], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename, col.types=c("numeric", "numeric", "numeric")) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-6) } diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_quasibinomial_glm_MOJO_offset.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_quasibinomial_glm_MOJO_offset.R index 065aa7f83af5..65bced0aca32 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_quasibinomial_glm_MOJO_offset.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_quasibinomial_glm_MOJO_offset.R @@ -37,7 +37,7 @@ test.GLM.offset.quasibinomial <- function() { h2o.downloadCSV(hf[1:100, xOffset], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename, col.types=c("numeric", "numeric", "numeric")) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) predictFrame <- twoFrames$h2oPredict[, 2:3] mojoFrame <- twoFrames$mojoPredict[, 2:3] compareFrames(predictFrame, mojoFrame, prob=1, tolerance = 1e-6) diff --git a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_tweedie_glm_MOJO_offset.R b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_tweedie_glm_MOJO_offset.R index 7d3483d199be..3c1699f448f7 100644 --- a/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_tweedie_glm_MOJO_offset.R +++ b/h2o-r/tests/testdir_javapredict/runit_PUBDEV_8330_tweedie_glm_MOJO_offset.R @@ -24,7 +24,7 @@ test.GLM.offset.tweedie <- function() { h2o.downloadCSV(hf[1:100, xOffset], filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename, col.types=c("numeric", "numeric", "numeric")) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-6) } diff --git a/h2o-r/tests/testdir_javapredict/runit_pubdev_4531_large.R b/h2o-r/tests/testdir_javapredict/runit_pubdev_4531_large.R index b0d9f584e784..08d4040d16a9 100644 --- a/h2o-r/tests/testdir_javapredict/runit_pubdev_4531_large.R +++ b/h2o-r/tests/testdir_javapredict/runit_pubdev_4531_large.R @@ -19,7 +19,6 @@ test <- test_file <- locate("smalldata/logreg/prostate_train_null_column_name.csv") test_frame <- h2o.importFile(test_file) params = prepTest() - browser() doJavapredictTest("gbm",test_file,test_frame,params) # make sure original code run # check a separator that is not a special character @@ -53,4 +52,4 @@ prepTest <- function() { return(params) } -doTest("pubdev-4531: PredictCsv test", test) \ No newline at end of file +doTest("pubdev-4531: PredictCsv test", test) diff --git a/h2o-r/tests/testdir_javapredict/runit_pubdev_5351_pca_mojo_large.R b/h2o-r/tests/testdir_javapredict/runit_pubdev_5351_pca_mojo_large.R index 0cfe66c57166..2d13ea3eeb89 100644 --- a/h2o-r/tests/testdir_javapredict/runit_pubdev_5351_pca_mojo_large.R +++ b/h2o-r/tests/testdir_javapredict/runit_pubdev_5351_pca_mojo_large.R @@ -16,7 +16,7 @@ test.PCA.mojo <- h2o.downloadCSV(params_prob_data$tDataset, filename) twoFrames<-mojoH2Opredict(modelAndDir$model, modelAndDir$dirName, filename) # perform H2O and mojo prediction and return frames h2o.downloadCSV(twoFrames$h2oPredict, sprintf("%s/h2oPred.csv", modelAndDir$dirName)) - h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirname)) + h2o.downloadCSV(twoFrames$mojoPredict, sprintf("%s/mojoOut.csv", modelAndDir$dirName)) compareFrames(twoFrames$h2oPredict,twoFrames$mojoPredict, prob=1, tolerance = 1e-4) } diff --git a/h2o-r/tests/testdir_javapredict/runit_pubdev_6617_setInvNumNA.R b/h2o-r/tests/testdir_javapredict/runit_pubdev_6617_setInvNumNA.R index 7121f7694eae..df83640a3f4d 100644 --- a/h2o-r/tests/testdir_javapredict/runit_pubdev_6617_setInvNumNA.R +++ b/h2o-r/tests/testdir_javapredict/runit_pubdev_6617_setInvNumNA.R @@ -18,7 +18,6 @@ test.mojo.setInvNumNA <- params$y <- "C2" params$family <- "gaussian" modelAndDir<-buildModelSaveMojoGLM(params) # build the model and save mojo - browser() modelPred <- h2o.predict(modelAndDir$model, testModel) # predict with invalid row value replaced with mean value # get genmodel.jar pathname a = strsplit(modelAndDir$dirName, '/') diff --git a/h2o-r/tests/testdir_jira/runit_PUBDEV_7362_merge_duplicate_others.R b/h2o-r/tests/testdir_jira/runit_PUBDEV_7362_merge_duplicate_others.R index 3a5c19945d4c..49005fb01a1f 100644 --- a/h2o-r/tests/testdir_jira/runit_PUBDEV_7362_merge_duplicate_others.R +++ b/h2o-r/tests/testdir_jira/runit_PUBDEV_7362_merge_duplicate_others.R @@ -4,38 +4,40 @@ source("../../scripts/h2o-r-test-setup.R") # problem with merge. test <- function() { # code from Kuba - left <- as.h2o(data.frame(topic=c("A","B","C","D"), value=c(12,13,14,15))) # [A, 12][B, 13][C, 14][D, 15] - right <- as.h2o(data.frame(topic=c("Y","B","X","D"), bigValue=c(10000, 20000, 30000, 40000))) #[Y, 10000][B, 20000][X, 30000][D, 40000] + left <- as.h2o(data.frame(topic=c("A","B","C","D"), value=c(12,13,14,15), stringsAsFactors = TRUE)) # [A, 12][B, 13][C, 14][D, 15] + right <- as.h2o(data.frame(topic=c("Y","B","X","D"), bigValue=c(10000, 20000, 30000, 40000), stringsAsFactors = TRUE)) #[Y, 10000][B, 20000][X, 30000][D, 40000] merged <- h2o.merge(right, left, all.x = TRUE, method="radix") - resultF <- as.h2o(data.frame(topic=c("B","D","X","Y"), bigvalue=c(20000, 40000, 30000, 10000), value = c(13, 15, NA, NA))) + resultF <- as.h2o(data.frame(topic=c("B","D","X","Y"), bigvalue=c(20000, 40000, 30000, 10000), value = c(13, 15, NA, NA), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"topic"), h2o.arrange(resultF,"topic")) merged <- h2o.merge(left, right, all.y = TRUE, method="radix") - resultF <- as.h2o(data.frame(topic=c("B","D","X","Y"), value = c(13, 15, NA, NA), bigvalue=c(20000, 40000, 30000, 10000))) + resultF <- as.h2o(data.frame(topic=c("B","D","X","Y"), value = c(13, 15, NA, NA), bigvalue=c(20000, 40000, 30000, 10000), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"topic"), h2o.arrange(resultF,"topic")) merged <- h2o.merge(left, right, all.x = FALSE, all.y = FALSE, method="radix") - resultF <- as.h2o(data.frame(topic=c("B","D"), value = c(13, 15), bigvalue=c(20000, 40000))) + resultF <- as.h2o(data.frame(topic=c("B","D"), value = c(13, 15), bigvalue=c(20000, 40000), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"topic"), h2o.arrange(resultF,"topic")) merged <- h2o.merge(right, left, all.x = FALSE, all.y = FALSE, method="radix") - resultF <- as.h2o(data.frame(topic=c("B","D"), bigvalue=c(20000, 40000), value = c(13, 15))) + resultF <- as.h2o(data.frame(topic=c("B","D"), bigvalue=c(20000, 40000), value = c(13, 15), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"topic"), h2o.arrange(resultF,"topic")) # customer code left_hf <- as.h2o(data.frame(fruit = c(-177000000, -4000000, 100000000000, 200000000000, 1000000000000), - color <- c('red', 'orange', 'yellow', 'red', 'blue'))) - right_hf <- as.h2o(data.frame(fruit = c(-177000000), citrus <- c(FALSE))) + color = c('red', 'orange', 'yellow', 'red', 'blue'), stringsAsFactors = TRUE)) + right_hf <- as.h2o(data.frame(fruit = c(-177000000), citrus = c(FALSE))) merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) resultF <- as.h2o(data.frame(fruit = c(100000000000,200000000000,1000000000000,-177000000,-4000000), - color=c('yellow','red','blue','red','orange'), citrus=c(NA, NA, NA, FALSE, NA))) + color=c('yellow','red','blue','red','orange'), citrus=c(NA, NA, NA, FALSE, NA), + stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # left frame starts lower - left_hf <- as.h2o(data.frame(fruit = c(2,3,0,257,256), color <- c('red', 'orange', 'yellow', 'red', 'blue'))) + left_hf <- as.h2o(data.frame(fruit = c(2,3,0,257,256), color = c('red', 'orange', 'yellow', 'red', 'blue'), + stringsAsFactors = TRUE)) right_hf <- as.h2o( data.frame(fruit = c(258,518,517,1030,1028,1028,1030,2049), - citrus <- c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE,TRUE))) + citrus = c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE,TRUE))) merged2 <- h2o.merge(left_hf, right_hf, all.y = TRUE) # H2O give wrong answer print(merged2) resultF <- as.h2o(data.frame(fruit=c(258,517,518,1028,1028,1030,1030,2049), @@ -45,13 +47,15 @@ test <- function() { merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) print(merged) - resultF <- as.h2o(data.frame(fruit=c(0,2,3,256,257), color=c('yellow','red','orange','blue','red'), citrus=c(NA,NA,NA,NA,NA))) + resultF <- as.h2o(data.frame(fruit=c(0,2,3,256,257), color=c('yellow','red','orange','blue','red'), + citrus=c(NA,NA,NA,NA,NA), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # both frame more or less overlapped left_hf <- as.h2o(data.frame(fruit = c(2,3,3,3,0,4,7,9,257,256,518,518,1028), color = c('red', 'orange', 'yellow', 'red', 'blue', 'purple', - 'cyan','red', 'orange', 'yellow', 'red', 'blue','negra'))) + 'cyan','red', 'orange', 'yellow', 'red', 'blue','negra'), + stringsAsFactors = TRUE)) right_hf <- as.h2o(data.frame(fruit = c(3,3,3,3,6,8,12,14,258,518,518,517,1030,1028,1028,1030,2049), citrus = c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE,TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE))) @@ -61,7 +65,8 @@ test <- function() { 'yellow','red','red','red','red','purple','cyan','red','yellow','orange', 'red','red','blue','blue','negra','negra'), citrus=c(NA,NA,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE, - NA,NA,NA,NA,NA,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE))) + NA,NA,NA,NA,NA,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE), + stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) merged <- h2o.merge(left_hf, right_hf, all.x=FALSE, all.y=FALSE) @@ -69,86 +74,87 @@ test <- function() { color=c('orange','orange','orange','orange','yellow','yellow','yellow','yellow', 'red','red','red','red','red','red','blue','blue','negra','negra'), citrus=c(TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE, - FALSE,FALSE,FALSE,FALSE,FALSE,FALSE))) + FALSE,FALSE,FALSE,FALSE,FALSE,FALSE), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged, "fruit"), h2o.arrange(resultF,"fruit")) # both frame with duplicate keys # left frame starts higher and with overlap - left_hf <- as.h2o(data.frame(fruit = c(2,3,0,257,256,518,1028), color <- c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'))) - right_hf <- as.h2o(data.frame(fruit = c(258,518,517,1030,1028,1030,1035), citrus <- c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE))) + left_hf <- as.h2o(data.frame(fruit = c(2,3,0,257,256,518,1028), color = c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'), stringsAsFactors = TRUE)) + right_hf <- as.h2o(data.frame(fruit = c(258,518,517,1030,1028,1030,1035), citrus = c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE), stringsAsFactors = TRUE)) merged <- h2o.merge(left_hf, right_hf, all.x = FALSE, all.y=FALSE) - resultF <- as.h2o(data.frame(fruit=c(518, 1028), color=c('purple', 'cyan'), citrus=c(TRUE, TRUE))) + resultF <- as.h2o(data.frame(fruit=c(518, 1028), color=c('purple', 'cyan'), citrus=c(TRUE, TRUE), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # left frame starts higher and no overlap left_hf <- as.h2o(data.frame(fruit = c(2,3,0,14,15,16,17), - color <- c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'))) + color = c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'), + stringsAsFactors = TRUE)) right_hf <- as.h2o(data.frame(fruit = c(258,518,517,1030,1028,1030,1035), - citrus <- c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE))) + citrus = c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE))) merged <- h2o.merge(left_hf, right_hf, all.x = FALSE, all.y=FALSE) print(merged) expect_true((nrow(merged) == 0 && ncol(merged) == 3), info="Merged frame and expected result are different in size.") merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) resultF <-as.h2o(data.frame(fruit=c(0,2,3,14,15,16,17), color=c('yellow','red','orange','red', 'blue', 'purple', 'cyan'), - citrus=c(NA,NA,NA,NA,NA,NA,NA))) + citrus=c(NA,NA,NA,NA,NA,NA,NA), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # code from Kuba - left <- as.h2o(data.frame(topic=c("A","B","C","D"), value=c(12,13,14,15))) # [A, 12][B, 13][C, 14][D, 15] - right <- as.h2o(data.frame(topic=c("Y","B","X","D"), bigValue=c(10000, 20000, 30000, 40000))) #[Y, 10000][B, 20000][X, 30000][D, 40000] + left <- as.h2o(data.frame(topic=c("A","B","C","D"), value=c(12,13,14,15), stringsAsFactors = TRUE)) # [A, 12][B, 13][C, 14][D, 15] + right <- as.h2o(data.frame(topic=c("Y","B","X","D"), bigValue=c(10000, 20000, 30000, 40000), stringsAsFactors = TRUE)) #[Y, 10000][B, 20000][X, 30000][D, 40000] merged <- h2o.merge(left, right, all.y = TRUE, method="radix") - resultF <- as.h2o(data.frame(topic=c("B","D","X","Y"), value = c(13, 15, NA, NA), bigvalue=c(20000, 40000, 30000, 10000))) + resultF <- as.h2o(data.frame(topic=c("B","D","X","Y"), value = c(13, 15, NA, NA), bigvalue=c(20000, 40000, 30000, 10000), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"topic"), h2o.arrange(resultF,"topic")) # example from Neema left_hf <- as.h2o(data.frame(fruit = c(-177000000, -4000000, 100000000000, 200000000000, 1000000000000), - color <- c('red', 'orange', 'yellow', 'red', 'blue'))) + color = c('red', 'orange', 'yellow', 'red', 'blue'), stringsAsFactors = TRUE)) right_hf <- as.h2o(data.frame(fruit = c(-177000000, -177000000), - citrus <- c(FALSE))) + citrus = c(FALSE))) merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) resultF <- as.h2o(data.frame(fruit = c(100000000000,200000000000,1000000000000,-177000000,-177000000,-4000000), - color=c('yellow','red','blue','red','red','orange'), citrus=c(NA, NA, NA, FALSE, FALSE, NA))) + color=c('yellow','red','blue','red','red','orange'), citrus=c(NA, NA, NA, FALSE, FALSE, NA), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) merged <- h2o.merge(left_hf, right_hf, all.y = TRUE) resultF <- as.h2o(data.frame(fruit = c(-177000000,-177000000), - color=c('red','red'), citrus=c(FALSE, FALSE))) + color=c('red','red'), citrus=c(FALSE, FALSE), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # more or less overlapped left_hf <- as.h2o(data.frame(fruit = c(2,3,0,257,256,518,1028), - color <- c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'))) + color = c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'), stringsAsFactors = TRUE)) right_hf <- as.h2o(data.frame(fruit = c(2,1,3,258,518,517,1030,1028,1030,1035,0), - citrus <- c(FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE))) + citrus = c(FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE))) merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) resultF <- as.h2o(data.frame(fruit=c(0,2,3,256,257,518,1028), color=c('yellow','red','orange','blue','red','purple','cyan'), - citrus=c(TRUE, FALSE, FALSE, NA, NA, TRUE, TRUE))) + citrus=c(TRUE, FALSE, FALSE, NA, NA, TRUE, TRUE), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # left frame with duplicate keys left_hf <- as.h2o(data.frame(fruit = c(2,3,3,3,3,0,257,256,518,1028, 1028, 1028), - color <- c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan', - 'black','red','violet','magenta','cyan'))) + color = c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan', + 'black','red','violet','magenta','cyan'), stringsAsFactors = TRUE)) right_hf <- as.h2o(data.frame(fruit = c(258,517,1030,1028,1030,2049), - citrus <- c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE))) + citrus = c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE))) merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) resultF <- as.h2o(data.frame(fruit=c(0,2,3,3,3,3,256,257,518,1028,1028,1028), color=c('purple','red', 'orange', 'yellow', 'red', 'blue','black','cyan','red','violet','magenta','cyan'), - citrus=c(NA,NA,NA,NA,NA,NA,NA,NA,NA,FALSE,FALSE,FALSE))) + citrus=c(NA,NA,NA,NA,NA,NA,NA,NA,NA,FALSE,FALSE,FALSE), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) # rite frame with duplicate keys left_hf <- as.h2o(data.frame(fruit = c(2,3,0,257,256,518,1028), - color <- c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'))) + color = c('red', 'orange', 'yellow', 'red', 'blue', 'purple', 'cyan'), stringsAsFactors = TRUE)) right_hf <- as.h2o(data.frame(fruit = c(3,3,3,3,258,518,517,1030,1028,1028,1030,2049), - citrus <- c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE,TRUE, TRUE, FALSE, FALSE, TRUE))) + citrus = c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE,TRUE, TRUE, FALSE, FALSE, TRUE))) merged <- h2o.merge(left_hf, right_hf, all.x = TRUE) resultF <- as.h2o(data.frame(fruit=c(0,2,3,3,3,3,256,257,518,1028,1028), color=c('yellow','red','orange','orange','orange','orange','blue','red','purple','cyan','cyan'), - citrus=c(NA, NA, TRUE, TRUE, FALSE, FALSE, NA, NA, FALSE, TRUE, FALSE))) + citrus=c(NA, NA, TRUE, TRUE, FALSE, FALSE, NA, NA, FALSE, TRUE, FALSE), stringsAsFactors = TRUE)) assertMergeCorrect(h2o.arrange(merged,"fruit"), h2o.arrange(resultF,"fruit")) } diff --git a/h2o-r/tests/testdir_jira/runit_hexdev_29_categorical_continuous.R b/h2o-r/tests/testdir_jira/runit_hexdev_29_categorical_continuous.R index 70cd5b20f450..a3199523e3dd 100644 --- a/h2o-r/tests/testdir_jira/runit_hexdev_29_categorical_continuous.R +++ b/h2o-r/tests/testdir_jira/runit_hexdev_29_categorical_continuous.R @@ -12,7 +12,8 @@ test.continuous.or.categorical <- function() { aa <- data.frame( h1 = c( 1, 8, 4, 3, 6), h2 = c('fish', 'cat', 'fish', 'dog', 'bird'), - h3 = c( 0, 1, 0, 0, 1) + h3 = c( 0, 1, 0, 0, 1), + stringsAsFactors = TRUE ) df.hex <- as.h2o(aa) diff --git a/h2o-r/tests/testdir_jira/runit_hexdev_29_import_types.R b/h2o-r/tests/testdir_jira/runit_hexdev_29_import_types.R index bb9592e6a417..5b37d499a6c5 100644 --- a/h2o-r/tests/testdir_jira/runit_hexdev_29_import_types.R +++ b/h2o-r/tests/testdir_jira/runit_hexdev_29_import_types.R @@ -11,7 +11,6 @@ source("../../scripts/h2o-r-test-setup.R") test.continuous.or.categorical <- function() { df.hex <- h2o.uploadFile(locate("smalldata/jira/hexdev_29.csv"), col.types = c("enum", "enum", "enum")) - browser() expect_true(is.factor(df.hex$h1)) expect_true(is.factor(df.hex$h2)) diff --git a/h2o-r/tests/testdir_jira/runit_pubdev_1383.R b/h2o-r/tests/testdir_jira/runit_pubdev_1383.R index 494c98a776ec..196b84bc2739 100644 --- a/h2o-r/tests/testdir_jira/runit_pubdev_1383.R +++ b/h2o-r/tests/testdir_jira/runit_pubdev_1383.R @@ -6,7 +6,7 @@ source("../../scripts/h2o-r-test-setup.R") test.pubdev.1383 <- function() { k <- 10 Log.info("Importing fgl_tr.csv...") - fgl.dat <- read.csv(locate("smalldata/pca_test/fgl_tr.csv")) + fgl.dat <- read.csv(locate("smalldata/pca_test/fgl_tr.csv"), stringsAsFactors = TRUE) fgl.hex <- h2o.importFile(locate("smalldata/pca_test/fgl_tr.csv")) print(summary(fgl.hex)) diff --git a/h2o-r/tests/testdir_jira/runit_pubdev_1398.R b/h2o-r/tests/testdir_jira/runit_pubdev_1398.R index bd72fbe2a9ad..c2be64abe8c9 100644 --- a/h2o-r/tests/testdir_jira/runit_pubdev_1398.R +++ b/h2o-r/tests/testdir_jira/runit_pubdev_1398.R @@ -6,7 +6,7 @@ source("../../scripts/h2o-r-test-setup.R") test.pubdev.1398 <- function() { k <- 13 Log.info("Importing decathlon.csv...") - dec.dat <- read.csv(locate("smalldata/pca_test/decathlon.csv")) + dec.dat <- read.csv(locate("smalldata/pca_test/decathlon.csv"), stringsAsFactors = TRUE) dec.hex <- h2o.importFile(locate("smalldata/pca_test/decathlon.csv")) print(summary(dec.hex)) diff --git a/h2o-r/tests/testdir_jira/runit_pubdev_1654.R b/h2o-r/tests/testdir_jira/runit_pubdev_1654.R index df947c113326..08e573da130e 100644 --- a/h2o-r/tests/testdir_jira/runit_pubdev_1654.R +++ b/h2o-r/tests/testdir_jira/runit_pubdev_1654.R @@ -8,7 +8,7 @@ test.pubdev.1654 <- function() { use_all_factor_levels <- FALSE Log.info("Importing birds.csv data...") - birds.dat <- read.csv(locate("smalldata/pca_test/birds.csv"), header = TRUE) + birds.dat <- read.csv(locate("smalldata/pca_test/birds.csv"), header = TRUE, stringsAsFactors = TRUE) birds.hex <- h2o.importFile(locate("smalldata/pca_test/birds.csv")) print(summary(birds.hex)) diff --git a/h2o-r/tests/testdir_jira/runit_pubdev_5518_autoencoder_grid.R b/h2o-r/tests/testdir_jira/runit_pubdev_5518_autoencoder_grid.R index e12f7694ffcc..4cca01509f0c 100644 --- a/h2o-r/tests/testdir_jira/runit_pubdev_5518_autoencoder_grid.R +++ b/h2o-r/tests/testdir_jira/runit_pubdev_5518_autoencoder_grid.R @@ -3,7 +3,6 @@ source("../../scripts/h2o-r-test-setup.R") # Test derived from Nidhi Mehta. Thanks. test.pubdev.5518 <- function() { - browser() N=1000 set.seed(5) color = sample(c("D","E","I","F","M"),size=N,replace=TRUE) diff --git a/h2o-r/tests/testdir_jira/runit_pubdev_8218.R b/h2o-r/tests/testdir_jira/runit_pubdev_8218.R index 357a1fc12a45..7b764ba52413 100644 --- a/h2o-r/tests/testdir_jira/runit_pubdev_8218.R +++ b/h2o-r/tests/testdir_jira/runit_pubdev_8218.R @@ -6,7 +6,8 @@ test.pubdev_8218 = function(){ df = data.frame( v1 = c('Y', 'Y', 'Y', 'N', 'N'), v2 = c('S', 'S', 'S', 'A', 'A'), - v3 = c('E1', 'E1', 'E1', 'B1', 'B1') + v3 = c('E1', 'E1', 'E1', 'B1', 'B1'), + stringsAsFactors = TRUE ) df.hex = as.h2o(df, 'dfhex') interaction = h2o.interaction( @@ -30,7 +31,8 @@ test.pubdev_8218 = function(){ df = data.frame( v1 = c('Y', 'Y', 'Y', 'N', 'N', 'Y'), v2 = c('S', 'S', 'S', 'A', 'A', 'N'), - v3 = c('E1', 'E1', 'E1', 'B1', 'B1', 'B1') + v3 = c('E1', 'E1', 'E1', 'B1', 'B1', 'B1'), + stringsAsFactors = TRUE ) df.hex = as.h2o(df, 'dfhex') interaction = h2o.interaction( diff --git a/h2o-r/tests/testdir_misc/runit_PUBDEV-6775-2D-pdp.R b/h2o-r/tests/testdir_misc/runit_PUBDEV-6775-2D-pdp.R index 0bd6e3507df1..8579e17b124c 100644 --- a/h2o-r/tests/testdir_misc/runit_PUBDEV-6775-2D-pdp.R +++ b/h2o-r/tests/testdir_misc/runit_PUBDEV-6775-2D-pdp.R @@ -7,7 +7,6 @@ test <- function() { ## Change CAPSULE to Enum prostate_hex[, "CAPSULE"] = as.factor(prostate_hex[, "CAPSULE"]) - browser() ## Run Random Forest in H2O temp_filename_no_extension <- tempfile(pattern = "pdp", tmpdir = tempdir(), fileext = "") ## Calculate partial dependence using h2o.partialPlot for columns "AGE" and "RACE" diff --git a/h2o-r/tests/testdir_misc/runit_as.h2o_sparse.R b/h2o-r/tests/testdir_misc/runit_as.h2o_sparse.R index 437a51ebf532..6dcc0dd6a3a4 100644 --- a/h2o-r/tests/testdir_misc/runit_as.h2o_sparse.R +++ b/h2o-r/tests/testdir_misc/runit_as.h2o_sparse.R @@ -22,7 +22,8 @@ test.as.h2o.sparse <- function() { j <- c(2, 9, 6:10, 46343) x <- pi * (1:8) m.large <- Matrix::sparseMatrix(i, j, x = x) - expect_error(as.matrix(m.large), "Cholmod error 'problem too large'") + # When we have enough memory R 4.4 can create the matrix without failing + # expect_error(as.matrix(m.large), "Cholmod error 'problem too large'|vector memory limit of .* reached") Log.info("Loading a large sparse matrix into H2O") h2o.large <- as.h2o(m.large, "large_matrix") diff --git a/h2o-r/tests/testdir_misc/runit_h2oconfig.R b/h2o-r/tests/testdir_misc/runit_h2oconfig.R index 0b52c13eb439..7afada31b7b0 100644 --- a/h2o-r/tests/testdir_misc/runit_h2oconfig.R +++ b/h2o-r/tests/testdir_misc/runit_h2oconfig.R @@ -88,7 +88,7 @@ test.config <- function() { password = password"),fileConn) #Parse config and check if correct config = .parse.h2oconfig(h2oconfig_filename) - expect_equal(config,data.frame(init.username = "name" ,init.password = "password")) + expect_equal(config,data.frame(init.username = "name" ,init.password = "password", stringsAsFactors = TRUE)) #Create tmp config writeLines(c("[general] @@ -99,7 +99,7 @@ test.config <- function() { password = password"),fileConn) #Parse config and check if correct config = .parse.h2oconfig(h2oconfig_filename) - expect_equal(config,data.frame(general.allow_breaking_changes = as.factor("True"),init.username = "name" ,init.password = "password")) + expect_equal(config,data.frame(general.allow_breaking_changes = as.factor("True"),init.username = "name" ,init.password = "password", stringsAsFactors = TRUE)) #Create tmp config writeLines(c(" @@ -108,10 +108,10 @@ test.config <- function() { init.password = password"),fileConn) #Parse config and check if correct config = .parse.h2oconfig(h2oconfig_filename) - expect_equal(config,data.frame(general.allow_breaking_changes = as.factor("True"),init.username = "name" ,init.password = "password")) + expect_equal(config,data.frame(general.allow_breaking_changes = as.factor("True"),init.username = "name" ,init.password = "password", stringsAsFactors = TRUE)) #Delete tmp directory on.exit(unlink(dir,recursive=TRUE)) } -doTest("Test h2o config parsing", test.config) \ No newline at end of file +doTest("Test h2o config parsing", test.config) diff --git a/h2o-r/tests/testdir_misc/runit_ifelse.R b/h2o-r/tests/testdir_misc/runit_ifelse.R index e7e06c3114d3..8733385ef00f 100644 --- a/h2o-r/tests/testdir_misc/runit_ifelse.R +++ b/h2o-r/tests/testdir_misc/runit_ifelse.R @@ -10,7 +10,7 @@ test.ifelse <- function() { Log.info("Find Setosa species H2O's ifelse...") setosa.hex <- ifelse(iris.hex$Species == "setosa", "N", "Y") - expect_equal(as.data.frame(setosa.hex), data.frame(C1 = setosa)) + expect_equal(as.data.frame(setosa.hex), data.frame(C1 = setosa, stringsAsFactors = TRUE)) } doTest("R and H2O ifelse Function", test.ifelse) diff --git a/h2o-r/tests/testdir_misc/runit_import_upload_singlequoted.R b/h2o-r/tests/testdir_misc/runit_import_upload_singlequoted.R index 0400d1b1660b..b1b36cfebe2b 100644 --- a/h2o-r/tests/testdir_misc/runit_import_upload_singlequoted.R +++ b/h2o-r/tests/testdir_misc/runit_import_upload_singlequoted.R @@ -13,7 +13,7 @@ test.import_single_quoted <- function() { expect_true(h2o.ncol(hdf) == 20) expect_true(h2o.nrow(hdf) == 7) - df <- read.csv(path, quote="'") + df <- read.csv(path, quote="'", stringsAsFactors = TRUE) hddf <- as.data.frame(hdf) # comparing last column only as it's difficult to compare dataframes in R (always cryptic errors on some column): # if parsing was ok, last column should be identical, otherwise it should be shifted @@ -29,7 +29,7 @@ test.upload_single_quoted <- function() { expect_true(h2o.ncol(hdf) == 20) expect_true(h2o.nrow(hdf) == 7) - df <- read.csv(path, quote="'") + df <- read.csv(path, quote="'", stringsAsFactors = TRUE) hddf <- as.data.frame(hdf) expect_equal(df['status'], hddf['status']) } diff --git a/h2o-r/tests/testdir_misc/runit_pubdev_5921_na_prints_large.R b/h2o-r/tests/testdir_misc/runit_pubdev_5921_na_prints_large.R index ebc210f9c5e1..8254ea838708 100644 --- a/h2o-r/tests/testdir_misc/runit_pubdev_5921_na_prints_large.R +++ b/h2o-r/tests/testdir_misc/runit_pubdev_5921_na_prints_large.R @@ -14,7 +14,6 @@ testPartialPlots <- function() { assert_twoDTable_equal(h2o_pp_weight[[1]], h2o_pp_weight_NA[[1]]) # compare Input_miss pdp assert_twoDTable_equal(h2o_pp_weight[[2]], h2o_pp_weight_NA[[2]]) # compare fDayOfWeek pdp - browser() manual_weighted_stats_im <- manual_partial_dependency(airlines_gbm, airlines_hex, h2o_pp_weight_NA[[1]][[1]], "Input_miss", as.data.frame(airlines_hex["Weight"]), 3) assert_twoDTable_array_equal(h2o_pp_weight_NA[[1]], manual_weighted_stats_im[1,], manual_weighted_stats_im[2,], manual_weighted_stats_im[3,]) manual_weighted_stats_day <- manual_partial_dependency(airlines_gbm, airlines_hex, h2o_pp_weight_NA[[2]][[1]], "fDayOfWeek", as.data.frame(airlines_hex["Weight"]), 3) diff --git a/h2o-r/tests/testdir_misc/runit_relevel.R b/h2o-r/tests/testdir_misc/runit_relevel.R index 48b57b61620e..87d95edfc7ad 100644 --- a/h2o-r/tests/testdir_misc/runit_relevel.R +++ b/h2o-r/tests/testdir_misc/runit_relevel.R @@ -28,7 +28,7 @@ test.relevel <- function() { expect_true(("DPROS.Both" %in% ns2), "Both level IS NOT expected to be skipped in re-leveled column") # compare against R - dr <- read.csv(locate("smalldata/prostate/prostate_cat.csv")) + dr <- read.csv(locate("smalldata/prostate/prostate_cat.csv"), stringsAsFactors=TRUE) dr$DPROS <- relevel(dr$DPROS,"None") mr <- glm(data=dr,CAPSULE ~ ., family=binomial) print(mr) diff --git a/h2o-r/tests/testdir_munging/unop/runit_head_tail.R b/h2o-r/tests/testdir_munging/unop/runit_head_tail.R index e9aa742a9a57..ee29a2fa23f7 100644 --- a/h2o-r/tests/testdir_munging/unop/runit_head_tail.R +++ b/h2o-r/tests/testdir_munging/unop/runit_head_tail.R @@ -6,7 +6,7 @@ source("../../../scripts/h2o-r-test-setup.R") test.head_tail <- function() { Log.info("Uploading iris/iris_wheader.csv") iris.hex <- h2o.importFile(locate("smalldata/iris/iris_wheader.csv"), "iris_wheader.hex") - iris.dat <- read.csv(locate("smalldata/iris/iris_wheader.csv")) + iris.dat <- read.csv(locate("smalldata/iris/iris_wheader.csv"), stringsAsFactors=TRUE) nrows <- nrow(iris.dat) ncols <- ncol(iris.dat) diff --git a/h2o-r/tests/testdir_parser/runit_GH_15741_force_col_types.R b/h2o-r/tests/testdir_parser/runit_GH_15741_force_col_types.R index 25fc429a970f..43d5f4a1d726 100644 --- a/h2o-r/tests/testdir_parser/runit_GH_15741_force_col_types.R +++ b/h2o-r/tests/testdir_parser/runit_GH_15741_force_col_types.R @@ -2,7 +2,6 @@ setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.force_col_types <- function() { - browser() originalTypes <- c("real", "int", "int", "int", "int", "string", "real", "string", "real", "real", "enum", "int", "int", "int", "int", "enum", 'real', 'real', "enum", "enum", "enum", 'real', "int", "int", "enum", "enum", "string", "int", "int", "int", "int", "int", "int", "int", "enum", "int", "string", "int", "string", "int", "string", "string", 'real', "int", "string", "int", 'real', 'real', "int", "int") h2odata <- h2o.importFile(path = locate("smalldata/parser/synthetic_dataset.csv")) checkTypes(originalTypes, h2odata) diff --git a/h2o-r/tests/testdir_parser/runit_GH_15741_parquet_force_col_types.R b/h2o-r/tests/testdir_parser/runit_GH_15741_parquet_force_col_types.R index 86a4fa29c5e0..10925a38e511 100644 --- a/h2o-r/tests/testdir_parser/runit_GH_15741_parquet_force_col_types.R +++ b/h2o-r/tests/testdir_parser/runit_GH_15741_parquet_force_col_types.R @@ -2,7 +2,6 @@ setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.force_col_types <- function() { - browser() originalTypes <- c("real", "int") # old H2O parse column tyoes h2odata <- h2o.importFile(path = locate("smalldata/parser/parquet/df.parquet")) checkTypes(originalTypes, h2odata) diff --git a/scripts/jenkins/groovy/buildConfig.groovy b/scripts/jenkins/groovy/buildConfig.groovy index 65d21237ea50..a212fe3b2150 100644 --- a/scripts/jenkins/groovy/buildConfig.groovy +++ b/scripts/jenkins/groovy/buildConfig.groovy @@ -14,7 +14,7 @@ class BuildConfig { private static final String DEFAULT_HADOOP_IMAGE_NAME = 'dev-build-hadoop' private static final String DEFAULT_RELEASE_IMAGE_NAME = 'dev-release' - public static final int DEFAULT_IMAGE_VERSION_TAG = 44 + public static final int DEFAULT_IMAGE_VERSION_TAG = 45 public static final String AWSCLI_IMAGE = DOCKER_REGISTRY + '/opsh2oai/awscli' public static final String S3CMD_IMAGE = DOCKER_REGISTRY + '/opsh2oai/s3cmd' diff --git a/scripts/jenkins/groovy/defineTestStages.groovy b/scripts/jenkins/groovy/defineTestStages.groovy index e0a0dd38e8cd..d009bdb6905a 100644 --- a/scripts/jenkins/groovy/defineTestStages.groovy +++ b/scripts/jenkins/groovy/defineTestStages.groovy @@ -53,6 +53,10 @@ def call(final pipelineContext) { stageName: 'R4.0 Smoke', target: 'test-r-smoke', rVersion: '4.0.2',timeoutValue: 8, component: pipelineContext.getBuildConfig().COMPONENT_R ], + [ + stageName: 'R4.4 Smoke', target: 'test-r-smoke', rVersion: '4.4.0',timeoutValue: 8, + component: pipelineContext.getBuildConfig().COMPONENT_R + ], [ stageName: 'Flow Headless Smoke', target: 'test-flow-headless-smoke',timeoutValue: 36, component: pipelineContext.getBuildConfig().COMPONENT_JS @@ -173,6 +177,14 @@ def call(final pipelineContext) { stageName: 'R4.0 CMD Check as CRAN', target: 'test-r-cmd-check-as-cran', rVersion: '4.0.2', timeoutValue: 20, hasJUnit: false, component: pipelineContext.getBuildConfig().COMPONENT_R ], + [ + stageName: 'R4.4 Small', target: 'test-r-small', rVersion: '4.4.0', + timeoutValue: 190, component: pipelineContext.getBuildConfig().COMPONENT_R + ], + [ + stageName: 'R4.4 CMD Check as CRAN', target: 'test-r-cmd-check-as-cran', rVersion: '4.4.0', + timeoutValue: 20, hasJUnit: false, component: pipelineContext.getBuildConfig().COMPONENT_R + ], [ stageName: 'R3.5 Booklets', target: 'test-r-booklets', rVersion: '3.5.3', timeoutValue: 60, component: pipelineContext.getBuildConfig().COMPONENT_R @@ -559,6 +571,10 @@ def call(final pipelineContext) { stageName: 'R4.0 Explain', target: 'test-r-explain', rVersion: '4.0.2', timeoutValue: 180, component: pipelineContext.getBuildConfig().COMPONENT_R ], + [ + stageName: 'R4.4 Explain', target: 'test-r-explain', rVersion: '4.4.0', + timeoutValue: 180, component: pipelineContext.getBuildConfig().COMPONENT_R + ], [ stageName: 'LOGGER inicialization test', target: 'test-logger-initialize-properly', javaVersion: 8, timeoutValue: 10, component: pipelineContext.getBuildConfig().COMPONENT_JAVA diff --git a/scripts/validate_r_cmd_check_output.py b/scripts/validate_r_cmd_check_output.py index b9748ffda763..465fc2be6873 100644 --- a/scripts/validate_r_cmd_check_output.py +++ b/scripts/validate_r_cmd_check_output.py @@ -35,10 +35,17 @@ def process(self): r"^\* using log directory", r"^\* using R version", r"^\* using R Under development", + r"^\* R was compiled by", + r"^ Apple clang.*", + r"^ gcc.*", + r"^ GNU Fortran.*", r"^\* using platform", + r"^\* using platform:.*", + r"^\* running under:.*", r"^\* using session charset", r"^\* using option .*", r"^\* checking .* \.\.\. OK", + r"^\* checking .* \.\.\. \[\d+s/\d+s\] OK", r"^\* checking extension type ... Package", r"^\* this is package",