From 838ba9ba427b3709e72f3205a6fdebca26373214 Mon Sep 17 00:00:00 2001 From: Simon Exner <43469235+0815Creeper@users.noreply.github.com> Date: Mon, 16 Sep 2024 09:42:06 +0200 Subject: [PATCH] fixes for Example.yml (#151) * fixes for Example.yml * formatted --- .github/workflows/Example.yml | 6 +++--- src/batch.jl | 2 -- src/optimiser.jl | 2 -- test/runtests.jl | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Example.yml b/.github/workflows/Example.yml index 790a8af9..3d863ee8 100644 --- a/.github/workflows/Example.yml +++ b/.github/workflows/Example.yml @@ -62,7 +62,7 @@ jobs: run: julia --project=examples/ examples/jupyter-src/${{ matrix.file-name }}.jl - name: "auto-commit (retry on merge)" - if: success() && github.event_name != 'pull_request' && github.branch == 'main' + if: success() && github.event_name != 'pull_request' && github.ref_name == 'main' uses: nick-fields/retry@v3 env: CI_COMMIT_MESSAGE: jupyter-example-${{ matrix.os }}-${{ matrix.file-name }}-${{ matrix.julia-version }}-${{ matrix.julia-arch }}-${{ matrix.experimental }}[${{ github.ref }}] @@ -107,7 +107,7 @@ jobs: - run: julia -e 'using PlutoSliderServer; PlutoSliderServer.export_directory("examples/pluto-src")' - name: "auto-commit (retry on merge)" - if: success() && github.event_name != 'pull_request' && github.branch == 'main' + if: success() && github.event_name != 'pull_request' && github.ref_name == 'main' uses: nick-fields/retry@v3 env: CI_COMMIT_MESSAGE: pluto-examples[${{ github.ref }}] @@ -140,7 +140,7 @@ jobs: call-docu: needs: [jupyter, pluto] - if: github.event_name != 'pull_request' && github.branch == 'main' + if: github.event_name != 'pull_request' && github.ref_name == 'main' runs-on: ubuntu-latest steps: # Trigger an repoisitory dispath event diff --git a/src/batch.jl b/src/batch.jl index 9d08707c..2e6d37af 100644 --- a/src/batch.jl +++ b/src/batch.jl @@ -643,5 +643,3 @@ function batchDataEvaluation( return batch end - - diff --git a/src/optimiser.jl b/src/optimiser.jl index ae628bcb..0b87de6e 100644 --- a/src/optimiser.jl +++ b/src/optimiser.jl @@ -94,5 +94,3 @@ function apply!(optim::FluxOptimiserWrapper, params) end ### generic FMIFlux.AbstractOptimiser ### - - diff --git a/test/runtests.jl b/test/runtests.jl index 36c31268..6e23bafc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -28,7 +28,7 @@ global EXPORTINGTOOL = nothing global EXPORTINGVERSION = nothing global X0 = [2.0, 0.0] global OPTIMISER = Descent -global FAILED_GRADIENTS_QUOTA = 1/3 +global FAILED_GRADIENTS_QUOTA = 1 / 3 # callback for bad optimization steps counter global FAILED_GRADIENTS = 0