Skip to content

Added gradient function to JAX frontend #10967

Added gradient function to JAX frontend

Added gradient function to JAX frontend #10967

name: test-experimental-nn-ivy
on:
push:
pull_request:
types: [labeled, opened, synchronize, reopened, review_requested]
permissions:
actions: read
jobs:
run-nightly-tests:
if: ${{(github.event_name == 'push') || contains(github.event.pull_request.labels.*.name, 'Exhaustive CI') || contains(github.event.pull_request.labels.*.name, 'Ivy API Experimental')}}
strategy:
matrix:
backends : [numpy, torch, jax, tensorflow]
submodules: [activations, layers, losses, norms]
continue-on-error: true
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️Ivy
uses: actions/checkout@v2
with:
path: ivy
persist-credentials: false
submodules: "recursive"
fetch-depth: 2
- name: Check Files Changed
shell: pwsh
id: check_file_changed
run: |
cd ivy
$diff = git diff --name-only HEAD^ HEAD
$SourceDiff = $diff | Where-Object { `
$_ -match 'ivy_tests/test_ivy/test_functional/test_experimental/test_nn/test_${{ matrix.submodules }}.py' `
}
$HasDiff = $SourceDiff.Length -gt 0
Write-Host "::set-output name=changed::$HasDiff"
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
if: github.event_name == 'pull_request' && steps.check_file_changed.outputs.changed == 'True'
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: test-ivy-experimental.yml
workflow_conclusion: ""
search_artifacts: true
name: hypothesis_${{ matrix.backends }}_test_experimental_zip
path: |
ivy/.hypothesis/
continue-on-error: true
- name: Unzip Hypothesis Examples
id: unzip
if: github.event_name == 'pull_request' && steps.check_file_changed.outputs.changed == 'True'
run: |
cd ivy/.hypothesis
unzip examples.zip
rm examples.zip
continue-on-error: true
- name: Create Hypothesis Directory
if: github.event_name == 'pull_request' && steps.check_file_changed.outputs.changed == 'True'
run: |
cd ivy
mkdir -p .hypothesis
cd .hypothesis
mkdir -p examples
continue-on-error: true
- name: Run Experimental Test
if: steps.check_file_changed.outputs.changed == 'True'
id: tests
run: |
cd ivy
./run_tests_CLI/test_experimental_nn.sh ${{ matrix.backends }} test_${{ matrix.submodules }} ${{ secrets.REDIS_CONNECTION_URL }} ${{ secrets.REDIS_PASSWORD}}
continue-on-error: true
- name: Zip Hypothesis Examples
if: github.event_name == 'pull_request' && steps.check_file_changed.outputs.changed == 'True'
run: |
cd ivy/.hypothesis
zip -r examples.zip examples
continue-on-error: true
- name: Upload hypothesis
uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request' && steps.check_file_changed.outputs.changed == 'True'
with:
name: hypothesis_${{ matrix.backends }}_test_${{ matrix.submodules }}_zip
path: |
ivy/.hypothesis/examples.zip
continue-on-error: true
- name: Install Mongo Python Client
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.check_file_changed.outputs.changed == 'True'
uses: BSFishy/pip-action@v1
with:
packages: |
pymongo[srv]
- name: Update Database
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.check_file_changed.outputs.changed == 'True'
env:
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }}
run: |
cd ivy/automation_tools/dashboard_automation/
python3 update_db.py "$MONGODB_PASSWORD" ${{ github.workflow }} "${{ matrix.backends }}-${{ matrix.submodules }}" ${{ steps.tests.outcome }} ${{ github.run_id }}
continue-on-error: true
- name: Check on failures
if: (steps.check_file_changed.outputs.changed == 'True' || steps.check_file_changed.conclusion == 'skipped') && steps.tests.outcome != 'success'
run: exit 1