Skip to content

Commit

Permalink
Issue #257 (#259)
Browse files Browse the repository at this point in the history
* Test rebuild

* ver upgrade

* Update test_yhat_model_info.R

* Update R-CMD-check.yaml

* Update test_yhat_model_info.R

* Update test_yhat_model_info.R
  • Loading branch information
maksymiuks authored Jul 16, 2020
1 parent b66b282 commit 21b3ba2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ jobs:
remotes::install_deps(dependencies = TRUE)
remotes::install_github("ModelOriented/ingredients")
remotes::install_github("ModelOriented/iBreakDown")
remotes::install_cran("rcmdcheck")
remotes::install_cran(c("rcmdcheck", "glmnet", "parsnip", "ranger", "randomForest", "e1071", "caret", "gbm", "rms", "rpart", "kernlab"))
shell: Rscript {0}

- name: Check
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--run-donttest", "--run-dontrun"),
build_args = "--compact-vignettes=no", error_on = "warning", check_dir = "check")
run: |
Sys.setenv(NOT_CRAN = "true")
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--run-donttest", "--run-dontrun"),
build_args = "--compact-vignettes=no", error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: DALEX
Title: moDel Agnostic Language for Exploration and eXplanation
Version: 1.3.0
Version: 1.3.1
Authors@R: c(person("Przemyslaw", "Biecek", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8423-1823")),
person("Szymon", "Maksymiuk", role = "aut"),
person("Hubert", "Baniecki", role = "aut",
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
DALEX 1.3.1
----------------------------------------------------------------
* Test were fixed so they will no rise false positive errors on CRAN

DALEX 1.3.0
----------------------------------------------------------------
* `DALEX` now fully supports multiclass classification.
Expand All @@ -12,7 +16,7 @@ DALEX 1.2.1
----------------------------------------------------------------
* fixed tests and WARNINGs on CRAN
* `model_profile` for Accumulated Local rofiles by default use centering (`center = TRUE`)
* deprecate `n_sample` argument in `model_parts` (now it's `N`) ([#175](https://github.com/ModelOriented/DALEX/issues/175))
* deprecate `n_sample` argument in `model_parts` (now it's `N`) ([#175](https://github.com/ModelOriented/DALEX/issues/175))

DALEX 1.2.0
----------------------------------------------------------------
Expand Down
Binary file modified tests/objects_for_tests/parsnip_classif.RData
Binary file not shown.
Binary file modified tests/objects_for_tests/parsnip_regr.RData
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/testthat/helper-objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ assign("message_prediction_breakdown", value = TRUE, envir = DALEX:::.DALEX.env)
assign("message_partial_dependency", value = TRUE, envir = DALEX:::.DALEX.env)
assign("message_accumulated_dependency", value = TRUE, envir = DALEX:::.DALEX.env)

library("ranger")

library("DALEX")
library("ranger")

# models
model_classif_glm <- glm(status == "fired"~., data = HR, family = "binomial")
Expand Down
9 changes: 9 additions & 0 deletions tests/testthat/test_yhat_model_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ titanic_imputed_cut <- titanic_imputed[1:100,]
apartments_cut <- apartments[1:100,]

test_that("randomForest", {
skip_on_cran()
#skip_if_no_codecov()
# model_classif_rf <- randomForest(as.factor(survived)~., data = titanic_imputed_cut, num.trees = 50, probability = TRUE)
# model_regr_rf <- randomForest(m2.price~., data = apartments_cut, num.trees = 50)
Expand Down Expand Up @@ -39,6 +40,7 @@ test_that("randomForest", {
})

test_that("svm", {
skip_on_cran()
#skip_if_no_codecov()
# model_classif_svm <- svm(as.factor(survived)~., data = titanic_imputed_cut, num.trees = 50, probability = TRUE)
# model_regr_svm <- svm(m2.price~., data = apartments_cut, num.trees = 50)
Expand Down Expand Up @@ -67,6 +69,7 @@ test_that("svm", {
})

test_that("gbm", {
skip_on_cran()
#skip_if_no_codecov()
# model_classif_gbm <- gbm(as.factor(survived)~., data = titanic_imputed_cut, distribution = "bernoulli",
# n.trees = 50)
Expand All @@ -91,6 +94,7 @@ test_that("gbm", {
})

test_that("glmnet and cvglmnet", {
skip_on_cran()
#skip_if_no_codecov()
# model_regr_glm <- glmnet(matrix(rnorm(100 * 20), 100, 20), rnorm(100))
# model_classif_glm_bin <- glmnet(matrix(rnorm(100 * 20), 100, 20), as.factor(round(runif(100))), family = "binomial")
Expand Down Expand Up @@ -139,6 +143,8 @@ test_that("glmnet and cvglmnet", {
})

test_that("parsnip", {
skip_on_cran()
message("kernlab package is necessary for local tests")
#skip_if_no_codecov()
# parsnip_regr <- svm_rbf(mode = "regression", rbf_sigma = 0.2)
# parsnip_regr <- set_engine(parsnip_regr, "kernlab")
Expand Down Expand Up @@ -171,6 +177,7 @@ test_that("parsnip", {
})

test_that("caret", {
skip_on_cran()
#skip_if_no_codecov()
# caret_regr <- train(m2.price~., data = apartments_cut, method="rf", ntree = 50)
# caret_regr_lm <- train(m2.price~., data = apartments_cut, method="lm")
Expand Down Expand Up @@ -222,6 +229,7 @@ test_that("glm", {
})

test_that("rpart", {
skip_on_cran()
#skip_if_no_codecov()
# model_classif_rpart <- rpart(as.factor(survived)~., data = titanic_imputed_cut)
# model_regr_rpart <- rpart(m2.price~., data = apartments_cut)
Expand All @@ -246,6 +254,7 @@ test_that("rpart", {
})

test_that("yhat default", {
skip_on_cran()
#skip_if_no_codecov()
# model_classif_rpart <- rpart(as.factor(survived)~., data = titanic_imputed_cut)
# model_regr_rpart <- rpart(m2.price~., data = apartments_cut)
Expand Down

0 comments on commit 21b3ba2

Please sign in to comment.