Files
mlpack/.github/workflows/main.yml
T
403b11ebbe updating range_search_test with mlpack/master (#7)
* softmin activation function added

* shift added

* shift changed for inputmax to inputmin

* Test added for softmin forward function

* errors fixed

* suggested changes

* forward function fixed

* added softmin to HISTORY.md

* forward result calculation source changed

* space added in comment

* backward function added

* backward test function added, values left

* Added WeightSize() to

linear.hpp
atrous_convolution.hpp
add.hpp.

* tests made similar to softmax

* conflict fix

* fixed HISTORY.md conflict

* tests made similar to softmax

* Update activation_functions_test.cpp

* Removed header iostream

* Apply suggestions from code review

Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Include bias term in linear layer.

* catch2 for mean_shift_test.cpp

* fixed backward function

* reverted changes to main/mean_shift_test.cpp

* corrected the test cases

* main/mean_shift_test.cpp from boost to catch2

* migrated mean_shift_test from boost to catch2

* tests changed

* tests changed

* Test for WeightSetVisitor and WeightSizeVisitor

* Fix common failures by increasing threshold

* Typo fix

* Auto Cancel build on new push and enable cache for build.

* Windows fix.

* Install R-bindings dependencies separately.

* rcmdcheck doesn't for building mlpack_r_tarball.

* Install roxygen2.

* Specify platform in windows build.

* Stop github actions running on a forked repo.

* softmin activation function added

shift added

shift changed for inputmax to inputmin

Test added for softmin forward function

errors fixed

suggested changes

forward function fixed

added softmin to HISTORY.md

forward result calculation source changed

space added in comment

backward function added

backward test function added, values left

tests made similar to softmax

conflict fix

fixed HISTORY.md conflict

tests made similar to softmax

Update activation_functions_test.cpp

Removed header iostream

fixed backward function

reverted changes to main/mean_shift_test.cpp

corrected the test cases

tests changed

tests changed

* Fix static issues

* All static issue fixed (hopefully)

* Migrate det and distribution test to catch2

Co-authored-by: Utkarsh Rai <utkarshrai491@gmail.com>
Co-authored-by: kartikdutt18 <kartikdutt@live.in>
Co-authored-by: Yashwant <yashwantsingh.sngh@gmail.com>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Co-authored-by: kartikdutt18 <39593019+kartikdutt18@users.noreply.github.com>
Co-authored-by: Ryan Birmingham <birm@gatech.edu>
Co-authored-by: jeffin143 <jeffinsam@karunya.edu.in>
2020-10-06 00:41:50 +05:30

155 lines
5.4 KiB
YAML

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
release:
types: [published, created, edited]
name: R CMD check mlpack
jobs:
cancel:
name: 'Cancel Previous Builds'
if: ${{ github.event_name == 'pull_request' && github.repository == 'mlpack/mlpack' }}
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Get all workflow ids and set to env variable
run: echo ::set-env name=WORKFLOW_IDS_TO_CANCEL::$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')
- uses: styfle/cancel-workflow-action@0.5.0
with:
workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }}
access_token: ${{ secrets.GITHUB_TOKEN }}
jobR:
name: Build mlpack_r_tarball
if: ${{ github.repository == 'mlpack/mlpack' }}
runs-on: ubuntu-20.04
outputs:
r_bindings: ${{ steps.mlpack_version.outputs.mlpack_r_package }}
steps:
- uses: actions/checkout@v2
- name: Extract mlpack version
id: mlpack_version
run: |
MLPACK_VERSION_MAJOR=$(grep -i ".*#define MLPACK_VERSION_MAJOR.*" src/mlpack/core/util/version.hpp | grep -o "[0-9]*")
MLPACK_VERSION_MINOR=$(grep -i ".*#define MLPACK_VERSION_MINOR.*" src/mlpack/core/util/version.hpp | grep -o "[0-9]*")
MLPACK_VERSION_PATCH=$(grep -i ".*#define MLPACK_VERSION_PATCH.*" src/mlpack/core/util/version.hpp | grep -o "[0-9]*")
MLPACK_VERSION_VALUE=${MLPACK_VERSION_MAJOR}.${MLPACK_VERSION_MINOR}.${MLPACK_VERSION_PATCH}
echo ::set-output name=mlpack_r_package::$(echo mlpack_"$MLPACK_VERSION_VALUE".tar.gz)
- uses: r-lib/actions/setup-r@master
with:
r-version: release
- name: Query dependencies
run: |
cp src/mlpack/bindings/R/mlpack/DESCRIPTION.in DESCRIPTION
Rscript -e "install.packages('remotes')" -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds')"
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-release-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-r-release-
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost-all-dev
curl https://data.kurg.org/armadillo-8.400.0.tar.xz | tar -xvJ && cd armadillo*
cmake . && make && sudo make install && cd ..
- name: Install R-bindings dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("roxygen2")
shell: Rscript {0}
- name: CMake
run: |
mkdir build
cd build && cmake -DDEBUG=OFF -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=ON ..
- name: Build
run: |
cd build && make R -j2
- name: Upload R packages
uses: actions/upload-artifact@v2
with:
name: mlpack_r_tarball
path: build/src/mlpack/bindings/R/${{ steps.mlpack_version.outputs.mlpack_r_package }}
R-CMD-check:
needs: jobR
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
if: ${{ github.repository == 'mlpack/mlpack' }}
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: '4.0'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
env:
MAKEFLAGS: "-j 2"
R_BUILD_ARGS: "--no-build-vignettes"
R_CHECK_ARGS: "--no-build-vignettes"
_R_CHECK_FORCE_SUGGESTS: 0
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/download-artifact@v2
with:
name: mlpack_r_tarball
- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@master
- name: Query dependencies
run: Rscript -e "install.packages('remotes')" -e "saveRDS(remotes::dev_package_deps('${{ needs.jobR.outputs.r_bindings }}', dependencies = TRUE), 'depends.Rds')"
- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
- name: Install dependencies
run: |
remotes::install_deps('${{ needs.jobR.outputs.r_bindings }}', dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
- name: Check
run: Rscript -e "rcmdcheck::rcmdcheck('${{ needs.jobR.outputs.r_bindings }}', args = c('--no-manual','--as-cran'), error_on = 'warning', check_dir = 'check')"
- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check