Skip to content

Commit

Permalink
feat: update to latest package versions (#81)
Browse files Browse the repository at this point in the history
* feat: update to latest package versions

* feat: update old compats

* test: use runtime activity
  • Loading branch information
avik-pal authored Nov 5, 2024
1 parent 8c3d30e commit dde207c
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- label: "Triggering Pipelines (Pull Request)"
if: "build.pull_request.base_branch == 'main'"
if: build.branch != "main" && build.tag == null
agents:
queue: "juliagpu"
plugins:
Expand Down
35 changes: 1 addition & 34 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ concurrency:

jobs:
ci:
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "min"
- "1.10"
- "1"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down Expand Up @@ -63,7 +60,6 @@ jobs:

downgrade:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') && github.base_ref == github.event.repository.default_branch }}
name: Downgrade Julia ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -88,34 +84,5 @@ jobs:
verbose: true
fail_ci_if_error: true

invalidations:
# Only run on PRs to the default branch.
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_default

- name: Report invalidation counts
run: |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
- name: Check if the PR does increase number of invalidations
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
run: exit 1

env:
BACKEND_GROUP: "CPU"
12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Boltz"
uuid = "4544d5e4-abc5-4dea-817f-29e4c205d9c8"
authors = ["Avik Pal <[email protected]> and contributors"]
version = "1.0.1"
version = "1.0.2"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down Expand Up @@ -44,25 +44,25 @@ BoltzTrackerExt = "Tracker"
BoltzZygoteExt = "Zygote"

[compat]
ADTypes = "1.5"
ADTypes = "1.9"
ArgCheck = "2.3"
Artifacts = "1.10, 1"
ChainRulesCore = "1.24"
Compat = "4.15"
ConcreteStructs = "0.2.3"
DataInterpolations = "6.4"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19, 1"
ForwardDiff = "0.10.36"
Functors = "0.4.12"
GPUArraysCore = "0.1.6, 0.2"
JLD2 = "0.5"
LazyArtifacts = "1.10"
Lux = "1"
Lux = "1.2"
LuxCore = "1"
MLDataDevices = "1.1"
MLDataDevices = "1.5"
Markdown = "1.10"
Metalhead = "0.9.4"
NNlib = "0.9.21"
NNlib = "0.9.24"
Random = "1.10"
Reexport = "1.2.2"
ReverseDiff = "1.15"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Boltz = "1"
Documenter = "1"
DocumenterCitations = "1"
DocumenterVitepress = "0.1"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19, 1"
Literate = "2"
Lux = "1"
Random = "1.10"
Expand Down
2 changes: 1 addition & 1 deletion examples/GettingStarted/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[compat]
Boltz = "1"
InteractiveUtils = "<0.0.1, 1"
JLD2 = "0.4.52, 0.5"
JLD2 = "0.5"
Literate = "2.19"
Lux = "1"
Metalhead = "0.9.3"
Expand Down
8 changes: 4 additions & 4 deletions examples/SymbolicOptimalControl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Boltz = "1"
CairoMakie = "0.12"
ComponentArrays = "0.15.11"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19, 1"
Latexify = "0.16.2"
Literate = "2"
Lux = "1"
MLJ = "0.20.3"
Optimization = "3.24.3"
OptimizationOptimJL = "0.2.3, 0.3"
OptimizationOptimisers = "0.2.1"
Optimization = "4"
OptimizationOptimJL = "0.4"
OptimizationOptimisers = "0.3.2"
OrdinaryDiffEqVerner = "1"
SciMLSensitivity = "7.57"
Statistics = "1.10"
Expand Down
6 changes: 4 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
Hwloc = "0e44f5e4-bd66-52a0-8798-143a42290a1d"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
LuxLib = "82251201-b29d-42c6-8e01-566dec8acb11"
LuxTestUtils = "ac9de150-d08f-4546-94fb-7472b5760531"
Expand All @@ -32,14 +33,15 @@ Bumper = "0.6, 0.7"
ComponentArrays = "0.15.16"
DataInterpolations = "6.4"
Downloads = "1.6"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19"
Enzyme = "0.12"
DynamicExpressions = "0.16, 0.17, 0.18, 0.19, 1"
Enzyme = "0.13"
ExplicitImports = "1.9.0"
ForwardDiff = "0.10.36"
GPUArraysCore = "0.1.6, 0.2"
Hwloc = "3.2.0"
InteractiveUtils = "<0.0.1, 1"
JLD2 = "0.5"
LoopVectorization = "0.12.171"
Lux = "1"
LuxLib = "1"
LuxTestUtils = "1.1.2"
Expand Down
14 changes: 7 additions & 7 deletions test/layer_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
@jet model(x, ps, st)

__f = (x, ps) -> sum(abs2, first(model(x, ps, st)))
test_gradients(
__f, x, ps; atol=1e-3, rtol=1e-3, soft_fail=[AutoFiniteDiff()])
@test_gradients(__f, x, ps; atol=1e-3, rtol=1e-3,
soft_fail=[AutoFiniteDiff()])
end
end
end
Expand Down Expand Up @@ -111,7 +111,7 @@ end
@jet tensor_project(x, ps, st)

__f = (x, ps) -> sum(abs2, first(tensor_project(x, ps, st)))
test_gradients(__f, x, ps; atol=1e-3, rtol=1e-3,
@test_gradients(__f, x, ps; atol=1e-3, rtol=1e-3,
skip_backends=[AutoTracker(), AutoEnzyme()])
end
end
Expand Down Expand Up @@ -216,12 +216,12 @@ end
@jet layer(x, ps, st)

__f = x -> sum(first(layer(x, ps, st)))
test_gradients(__f, x; atol=1.0f-3, rtol=1.0f-3)
@test_gradients(__f, x; atol=1.0f-3, rtol=1.0f-3, enzyme_set_runtime_activity=true)
end
end

@testitem "Dynamic Expressions Layer" setup=[SharedTestSetup] tags=[:layers] begin
using DynamicExpressions, ForwardDiff, ComponentArrays, Bumper
using DynamicExpressions, ForwardDiff, ComponentArrays, Bumper, LoopVectorization

operators = OperatorEnum(; binary_operators=[+, -, *], unary_operators=[cos])

Expand All @@ -244,7 +244,7 @@ end
y, st_ = layer(x, ps, st)
@test eltype(y) == Float32
__f = (x, p) -> sum(abs2, first(layer(x, p, st)))
test_gradients(__f, x, ps; atol=1.0f-3, rtol=1.0f-3, skip_backends=[AutoEnzyme()])
@test_gradients(__f, x, ps; atol=1.0f-3, rtol=1.0f-3, skip_backends=[AutoEnzyme()])

# Particular ForwardDiff dispatches
ps_ca = ComponentArray(ps)
Expand All @@ -265,7 +265,7 @@ end
y, st_ = layer(x, ps, st)
@test eltype(y) == Float64
__f = (x, p) -> sum(abs2, first(layer(x, p, st)))
test_gradients(__f, x, ps; atol=1.0e-3, rtol=1.0e-3, skip_backends=[AutoEnzyme()])
@test_gradients(__f, x, ps; atol=1.0e-3, rtol=1.0e-3, skip_backends=[AutoEnzyme()])
end

@testset "$(mode)" for (mode, aType, dev, ongpu) in MODES
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using Boltz

const BOLTZ_TEST_GROUP = get(ENV, "BOLTZ_TEST_GROUP", "all")
const RETESTITEMS_NWORKERS = parse(
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 16))))
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4))))
const RETESTITEMS_NWORKER_THREADS = parse(Int,
get(ENV, "RETESTITEMS_NWORKER_THREADS",
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))))
Expand Down
3 changes: 0 additions & 3 deletions test/shared_testsetup.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@testsetup module SharedTestSetup

using Enzyme
Enzyme.API.runtimeActivity!(true)

import Reexport: @reexport
@reexport using Boltz, Lux, GPUArraysCore, LuxLib, LuxTestUtils, Random, StableRNGs
using MLDataDevices, JLD2
Expand Down

2 comments on commit dde207c

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/118759

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.2 -m "<description of version>" dde207c0ac28b50e7fe1c20247274b8893f3350b
git push origin v1.0.2

Please sign in to comment.