Skip to content

Commit 8f5c519

Browse files
add keras skips (#1303)
1 parent c14d973 commit 8f5c519

File tree

8 files changed

+32
-21
lines changed

8 files changed

+32
-21
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,19 @@ jobs:
5959
extra-packages: any::rcmdcheck
6060
needs: check
6161

62-
- name: Install reticulate
63-
run: pak::pkg_install('reticulate')
62+
- name: Install dev reticulate
63+
run: pak::pkg_install('rstudio/reticulate')
6464
shell: Rscript {0}
6565

66-
- name: Install Miniconda
67-
# conda can fail at downgrading python, so we specify python version in advance
68-
env:
69-
RETICULATE_MINICONDA_PYTHON_VERSION: "3.8"
70-
run: reticulate::install_miniconda() # creates r-reticulate conda env by default
71-
shell: Rscript {0}
66+
- uses: actions/setup-python@v4
67+
with:
68+
python-version: 3.11
7269

7370
- name: Install TensorFlow
7471
run: |
75-
tensorflow::install_tensorflow(version='2.13', conda_python_version = NULL)
72+
reticulate::virtualenv_create('r-reticulate', python='3.11')
73+
reticulate::use_virtualenv('r-reticulate')
74+
tensorflow::install_tensorflow(version='2.16')
7675
shell: Rscript {0}
7776

7877
- uses: r-lib/actions/check-r-package@v2

.github/workflows/pkgdown.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ jobs:
3737
needs: website
3838

3939
- name: Install Miniconda
40-
# conda can fail at downgrading python, so we specify python version in advance
41-
env:
42-
RETICULATE_MINICONDA_PYTHON_VERSION: "3.8"
43-
run: reticulate::install_miniconda() # creates r-reticulate conda env by default
40+
run: |
41+
reticulate::install_miniconda()
4442
shell: Rscript {0}
45-
43+
4644
- name: Install TensorFlow
4745
run: |
48-
tensorflow::install_tensorflow(version='2.13', conda_python_version = NULL)
46+
reticulate::conda_create('r-reticulate', packages = c('python==3.11'))
47+
tensorflow::install_tensorflow(version='2.16')
4948
shell: Rscript {0}
5049

5150
- name: Install Torch

.github/workflows/test-coverage.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ jobs:
3232
shell: Rscript {0}
3333

3434
- name: Install Miniconda
35-
# conda can fail at downgrading python, so we specify python version in advance
36-
env:
37-
RETICULATE_MINICONDA_PYTHON_VERSION: "3.8"
38-
run: reticulate::install_miniconda() # creates r-reticulate conda env by default
35+
run: |
36+
reticulate::install_miniconda()
3937
shell: Rscript {0}
40-
38+
4139
- name: Install TensorFlow
4240
run: |
43-
tensorflow::install_tensorflow(version='2.13', conda_python_version = NULL)
41+
reticulate::conda_create('r-reticulate', packages = c('python==3.11'))
42+
tensorflow::install_tensorflow(version='2.16')
4443
shell: Rscript {0}
4544

4645
- name: Test coverage

tests/testthat/test-linear_reg_keras.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
skip("waiting for keras3")
12
skip_if_not_installed("modeldata")
23

34
hpc <- hpc_data[1:150, c(2:5, 8)]

tests/testthat/test-logistic_reg_keras.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
skip("waiting for keras3")
12
skip_if_not_installed("modeldata")
23

34
# ------------------------------------------------------------------------------

tests/testthat/test-mlp_keras.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
skip("waiting for keras3")
12
skip_if_not_installed("modeldata")
23

34
hpc <- hpc_data[1:150, c(2:5, 8)]

tests/testthat/test-multinom_reg_keras.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
skip("waiting for keras3")
12
skip_if_not_installed("modeldata")
23

34
hpc <- hpc_data[1:150, c(2:5, 8)]

vignettes/articles/Examples.Rmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ The following examples use consistent data sets throughout. For regression, we u
553553
Now we create the model fit object:
554554

555555
```{r}
556+
#| eval: false
556557
set.seed(1)
557558
linreg_reg_fit <- linreg_reg_spec |> fit(ridership ~ ., data = Chicago_train)
558559
linreg_reg_fit
@@ -561,6 +562,7 @@ The following examples use consistent data sets throughout. For regression, we u
561562
The holdout data can be predicted:
562563

563564
```{r}
565+
#| eval: false
564566
predict(linreg_reg_fit, Chicago_test)
565567
```
566568

@@ -791,6 +793,7 @@ The following examples use consistent data sets throughout. For regression, we u
791793
Now we create the model fit object:
792794

793795
```{r}
796+
#| eval: false
794797
set.seed(1)
795798
logreg_cls_fit <- logreg_cls_spec |> fit(Class ~ ., data = data_train)
796799
logreg_cls_fit
@@ -799,6 +802,7 @@ The following examples use consistent data sets throughout. For regression, we u
799802
The holdout data can be predicted for both hard class predictions and probabilities. We'll bind these together into one tibble:
800803

801804
```{r}
805+
#| eval: false
802806
bind_cols(
803807
predict(logreg_cls_fit, data_test),
804808
predict(logreg_cls_fit, data_test, type = "prob")
@@ -1103,6 +1107,7 @@ The following examples use consistent data sets throughout. For regression, we u
11031107
Now we create the model fit object:
11041108

11051109
```{r}
1110+
#| eval: false
11061111
set.seed(1)
11071112
mlp_reg_fit <- mlp_reg_spec |> fit(ridership ~ ., data = Chicago_train)
11081113
mlp_reg_fit
@@ -1111,6 +1116,7 @@ The following examples use consistent data sets throughout. For regression, we u
11111116
The holdout data can be predicted:
11121117

11131118
```{r}
1119+
#| eval: false
11141120
predict(mlp_reg_fit, Chicago_test)
11151121
```
11161122

@@ -1136,6 +1142,7 @@ The following examples use consistent data sets throughout. For regression, we u
11361142
Now we create the model fit object:
11371143

11381144
```{r}
1145+
#| eval: false
11391146
set.seed(1)
11401147
mlp_cls_fit <- mlp_cls_spec |> fit(Class ~ ., data = data_train)
11411148
mlp_cls_fit
@@ -1144,6 +1151,7 @@ The following examples use consistent data sets throughout. For regression, we u
11441151
The holdout data can be predicted for both hard class predictions and probabilities. We'll bind these together into one tibble:
11451152

11461153
```{r}
1154+
#| eval: false
11471155
bind_cols(
11481156
predict(mlp_cls_fit, data_test),
11491157
predict(mlp_cls_fit, data_test, type = "prob")
@@ -1365,6 +1373,7 @@ The following examples use consistent data sets throughout. For regression, we u
13651373
Now we create the model fit object:
13661374

13671375
```{r}
1376+
#| eval: false
13681377
set.seed(1)
13691378
mr_cls_fit <- mr_cls_spec |> fit(island ~ ., data = penguins_train)
13701379
mr_cls_fit
@@ -1373,6 +1382,7 @@ The following examples use consistent data sets throughout. For regression, we u
13731382
The holdout data can be predicted for both hard class predictions and probabilities. We'll bind these together into one tibble:
13741383

13751384
```{r}
1385+
#| eval: false
13761386
bind_cols(
13771387
predict(mr_cls_fit, penguins_test),
13781388
predict(mr_cls_fit, penguins_test, type = "prob")

0 commit comments

Comments
 (0)