-
Notifications
You must be signed in to change notification settings - Fork 106
Update internal functions to reflect deprecated keras functions #639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1c9e2ba
Add keras_predict_classes to replace use of keras::predict_classes
EmilHvitfeldt 0174f98
use keras_predict_classes
EmilHvitfeldt 06449a7
update mlp_keras reference calculations in tests
EmilHvitfeldt dafc0da
move from predict_proba() to predict()
EmilHvitfeldt 79f4d72
Create conditional tensorflow checking
EmilHvitfeldt e609d64
use newer version of tensorflow in GHA
EmilHvitfeldt 5b7e470
Add old tensorflow version GHA
EmilHvitfeldt b0f3bc7
Set seeds for tensorflow
EmilHvitfeldt d0c751a
only set tensorflow seed when you need it
EmilHvitfeldt 742c5f9
conditionally set seed in tensorflow by tensorflow version
EmilHvitfeldt 243df0f
do conditional check innside keras_predict_* functions as well
EmilHvitfeldt fa76e09
Add missing set_seed to keras logistic reg test
EmilHvitfeldt a03cf8b
Merge branch 'update-keras' of github.com:tidymodels/parsnip into upd…
EmilHvitfeldt f03a7fe
seperate out old-tensorflow GHA
EmilHvitfeldt d0b8534
add last missing tensorflow set_seed
EmilHvitfeldt 372f78b
you need tensorflow AND R seed...
EmilHvitfeldt 54466c2
use keras version as switch
EmilHvitfeldt 121f31b
Conditionally transform predictions depending on tensorflow version
EmilHvitfeldt 14b5fa3
skip test if tensorflow version can't be found
EmilHvitfeldt 0150aff
refactor keras_predict_classes to avoid post function
EmilHvitfeldt c2d34c4
Add keras_set_seed function
EmilHvitfeldt f42ed42
remove remotes
EmilHvitfeldt 89288c6
rename keras_set_seed
EmilHvitfeldt e2383d3
add news
EmilHvitfeldt b1e9713
rename to set_tf_seed in all tests
EmilHvitfeldt e15d1c4
Merge branch 'main' into update-keras
EmilHvitfeldt b95b6b6
update from main
topepo 5dcd898
merge main
EmilHvitfeldt af9cbe3
adjust "R CMD Check" and "old tensorflow" GHA
EmilHvitfeldt 12ce5b8
don't use keras_predict_proba anymore
EmilHvitfeldt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Workflow derived from https://github.com/r-lib/actions/tree/master/examples | ||
| # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
| # | ||
| # NOTE: This workflow is overkill for most R packages and | ||
| # check-standard.yaml is likely a better choice. | ||
| # usethis::use_github_action("check-standard") will install it. | ||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
| workflow_dispatch: | ||
|
|
||
| name: old-tensorflow | ||
|
|
||
| jobs: | ||
| old-tensorflow: | ||
| runs-on: ${{ matrix.config.os }} | ||
|
|
||
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: | ||
| - {os: windows-latest, r: 'release'} | ||
| # Use older ubuntu to maximise backward compatibility | ||
| - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} | ||
| env: | ||
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
| R_KEEP_PKG_SOURCE: yes | ||
| CXX14: g++ | ||
| CXX14STD: -std=c++1y | ||
| CXX14FLAGS: -Wall -g -02 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - uses: r-lib/actions/setup-pandoc@v2 | ||
|
|
||
| - uses: r-lib/actions/setup-r@v2 | ||
| with: | ||
| r-version: ${{ matrix.config.r }} | ||
| http-user-agent: ${{ matrix.config.http-user-agent }} | ||
| use-public-rspm: true | ||
|
|
||
| - uses: r-lib/actions/setup-r-dependencies@v2 | ||
| with: | ||
| extra-packages: rcmdcheck | ||
|
|
||
| - name: Install dev reticulate | ||
| run: pak::pkg_install('rstudio/reticulate') | ||
| shell: Rscript {0} | ||
|
|
||
| - name: Install Miniconda | ||
| # conda can fail at downgrading python, so we specify python version in advance | ||
| env: | ||
| RETICULATE_MINICONDA_PYTHON_VERSION: "3.7" | ||
| run: reticulate::install_miniconda() # creates r-reticulate conda env by default | ||
| shell: Rscript {0} | ||
|
|
||
| - name: Install TensorFlow | ||
| run: | | ||
| tensorflow::install_tensorflow(version='1.15', conda_python_version = NULL) | ||
| shell: Rscript {0} | ||
|
|
||
| - uses: r-lib/actions/check-r-package@v2 | ||
|
|
||
| - name: Show testthat output | ||
| if: always() | ||
| run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
| shell: bash | ||
|
|
||
| - name: Upload check results | ||
| if: failure() | ||
| uses: actions/upload-artifact@main | ||
| with: | ||
| name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
| path: check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.