diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91fb6f7..8c4db8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,8 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 with: - file: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + verbose: true diff --git a/Project.toml b/Project.toml index 3e5a830..61cb3c3 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [compat] +Statistics = "1" julia = "^1" [extras] diff --git a/README.md b/README.md index 0915363..d88cf25 100644 --- a/README.md +++ b/README.md @@ -80,19 +80,19 @@ subtype `T` has a detailed doc-string queried with `?T` at the REPL. Here is a short summary: -criterion | description | notation in Prechelt -----------------------|-------------------------------------------------------|--------------------- -`Never()` | Never stop | -`InvalidValue()` | Stop when `NaN`, `Inf` or `-Inf` encountered | -`TimeLimit(t=0.5)` | Stop after `t` hours | -`NumberLimit(n=100)` | Stop after `n` loss updates (excl. "training losses") | -`NumberSinceBest(n=6)`| Stop after `n` loss updates (excl. "training losses") | -`Threshold(value=0.0)`| Stop when `loss < value` | -`GL(alpha=2.0)` | Stop after "Generalization Loss" exceeds `alpha` | ``GL_α`` -`PQ(alpha=0.75, k=5)` | Stop after "Progress-modified GL" exceeds `alpha` | ``PQ_α`` -`Patience(n=5)` | Stop after `n` consecutive loss increases | ``UP_s`` -`Disjunction(c...)` | Stop when any of the criteria `c` apply | -`Warmup(c; n=1)` | Wait for `n` loss updates before checking criteria `c`| +| criterion | description | notation in Prechelt | +|:-----------------------|:------------------------------------------------------------------------------------|:---------------------| +| `Never()` | Never stop | | +| `InvalidValue()` | Stop when `NaN`, `Inf` or `-Inf` encountered | | +| `TimeLimit(t=0.5)` | Stop after `t` hours | | +| `NumberLimit(n=100)` | Stop after `n` loss updates (excl. "training losses") | | +| `NumberSinceBest(n=6)` | Stop when best loss occurred on the `n`th previous update (excl. "training losses") | | +| `Threshold(value=0.0)` | Stop when `loss < value` | | +| `GL(alpha=2.0)` | Stop after "Generalization Loss" exceeds `alpha` | ``GL_α`` | +| `PQ(alpha=0.75, k=5)` | Stop after "Progress-modified GL" exceeds `alpha` | ``PQ_α`` | +| `Patience(n=5)` | Stop after `n` consecutive loss increases | ``UP_s`` | +| `Disjunction(c...)` | Stop when any of the criteria `c` apply | | +| `Warmup(c; n=1)` | Wait for `n` loss updates before checking criteria `c` | | ## Criteria tracking both training and out-of-sample losses diff --git a/src/EarlyStopping.jl b/src/EarlyStopping.jl index 1e976aa..1082c91 100644 --- a/src/EarlyStopping.jl +++ b/src/EarlyStopping.jl @@ -1,4 +1,4 @@ -module EarlyStopping +module EarlyStopping using Dates using Statistics