Skip to content

Commit dbcfe62

Browse files
authored
Update (#4)
1 parent 9334dbb commit dbcfe62

File tree

6 files changed

+94
-67
lines changed

6 files changed

+94
-67
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ jobs:
2121
os: [ubuntu-latest]
2222
arch: [x64]
2323
allow_failure: [false]
24-
include:
25-
- version: 'nightly'
26-
os: ubuntu-latest
27-
arch: x64
28-
allow_failure: true
2924
steps:
3025
- uses: actions/checkout@v3
3126
- uses: julia-actions/setup-julia@v1

.github/workflows/test-nightly.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: test-nightly
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
concurrency:
9+
# Skip intermediate builds: always.
10+
# Cancel intermediate builds: only if it is a pull request build.
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
jobs:
14+
test:
15+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
version: ['nightly']
21+
os: [ubuntu-latest]
22+
arch: [x64]
23+
allow_failure: [false]
24+
steps:
25+
- uses: actions/checkout@v3
26+
- uses: julia-actions/setup-julia@v1
27+
with:
28+
version: ${{ matrix.version }}
29+
arch: ${{ matrix.arch }}
30+
- uses: julia-actions/cache@v1
31+
- uses: julia-actions/julia-buildpkg@v1
32+
- uses: julia-actions/julia-runtest@v1

Project.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DifferentiableFrankWolfe"
22
uuid = "b383313e-5450-4164-a800-befbd27b574d"
33
authors = ["Guillaume Dalle <[email protected]> and contributors"]
4-
version = "0.1.0"
4+
version = "0.1.1"
55

66
[deps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
@@ -12,13 +12,14 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1212
[compat]
1313
ChainRulesCore = "1.15"
1414
FrankWolfe = "0.2"
15-
ImplicitDifferentiation = "0.4"
15+
ImplicitDifferentiation = "=0.4.4"
1616
julia = "1.6"
1717

1818
[extras]
1919
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
2020
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
2121
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
22+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
2223
FrankWolfe = "f55ce6ea-fdc5-4628-88c5-0087fe54bd30"
2324
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
2425
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
@@ -28,4 +29,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2829
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
2930

3031
[targets]
31-
test = ["Aqua", "ChainRulesCore", "Documenter", "FrankWolfe", "JET", "JuliaFormatter", "Random", "Statistics", "Test", "Zygote"]
32+
test = ["Aqua", "ChainRulesCore", "Documenter", "ForwardDiff", "FrankWolfe", "JET", "JuliaFormatter", "Random", "Statistics", "Test", "Zygote"]

docs/Manifest.toml

Lines changed: 47 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.9.0-rc3"
3+
julia_version = "1.9.1"
44
manifest_format = "2.0"
55
project_hash = "a8dc9cefa8fd0b2e0fcfb2aa03fc750f1e1342f5"
66

@@ -50,9 +50,9 @@ weakdeps = ["ChainRulesCore"]
5050

5151
[[deps.Adapt]]
5252
deps = ["LinearAlgebra", "Requires"]
53-
git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef"
53+
git-tree-sha1 = "76289dc51920fdc6e0013c872ba9551d54961c24"
5454
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
55-
version = "3.6.1"
55+
version = "3.6.2"
5656

5757
[deps.Adapt.extensions]
5858
AdaptStaticArraysExt = "StaticArrays"
@@ -101,15 +101,15 @@ version = "0.4.2"
101101

102102
[[deps.ChainRules]]
103103
deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics", "StructArrays"]
104-
git-tree-sha1 = "8bae903893aeeb429cf732cf1888490b93ecf265"
104+
git-tree-sha1 = "61549d9b52c88df34d21bd306dba1d43bb039c87"
105105
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
106-
version = "1.49.0"
106+
version = "1.51.0"
107107

108108
[[deps.ChainRulesCore]]
109109
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
110-
git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9"
110+
git-tree-sha1 = "e30f2f4e20f7f186dc36529910beaedc60cfa644"
111111
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
112-
version = "1.15.7"
112+
version = "1.16.0"
113113

114114
[[deps.CodecBzip2]]
115115
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
@@ -131,9 +131,9 @@ version = "0.3.0"
131131

132132
[[deps.Compat]]
133133
deps = ["UUIDs"]
134-
git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957"
134+
git-tree-sha1 = "4e88377ae7ebeaf29a047aa1ee40826e0b708a5d"
135135
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
136-
version = "4.6.1"
136+
version = "4.7.0"
137137
weakdeps = ["Dates", "LinearAlgebra"]
138138

139139
[deps.Compat.extensions]
@@ -159,9 +159,9 @@ version = "1.5.2"
159159
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
160160

161161
[[deps.DataAPI]]
162-
git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630"
162+
git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c"
163163
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
164-
version = "1.14.0"
164+
version = "1.15.0"
165165

166166
[[deps.DataStructures]]
167167
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
@@ -186,15 +186,15 @@ version = "1.1.0"
186186

187187
[[deps.DiffRules]]
188188
deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"]
189-
git-tree-sha1 = "a4ad7ef19d2cdc2eff57abbbe68032b1cd0bd8f8"
189+
git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272"
190190
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
191-
version = "1.13.0"
191+
version = "1.15.1"
192192

193193
[[deps.DifferentiableFrankWolfe]]
194194
deps = ["ChainRulesCore", "FrankWolfe", "ImplicitDifferentiation", "LinearAlgebra"]
195195
path = ".."
196196
uuid = "b383313e-5450-4164-a800-befbd27b574d"
197-
version = "0.1.0"
197+
version = "0.1.1"
198198

199199
[[deps.Distributed]]
200200
deps = ["Random", "Serialization", "Sockets"]
@@ -232,9 +232,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
232232

233233
[[deps.FillArrays]]
234234
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
235-
git-tree-sha1 = "fc86b4fd3eff76c3ce4f5e96e2fdfa6282722885"
235+
git-tree-sha1 = "e17cc4dc2d0b0b568e80d937de8ed8341822de67"
236236
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
237-
version = "1.0.0"
237+
version = "1.2.0"
238238

239239
[[deps.ForwardDiff]]
240240
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"]
@@ -250,25 +250,25 @@ version = "0.10.35"
250250

251251
[[deps.FrankWolfe]]
252252
deps = ["Arpack", "GenericSchur", "Hungarian", "LinearAlgebra", "MathOptInterface", "Printf", "ProgressMeter", "Random", "Setfield", "SparseArrays", "TimerOutputs"]
253-
git-tree-sha1 = "1f70cb3f7a2b1be2c10ee8ba85ec30bf0241db1e"
253+
git-tree-sha1 = "d20da4c0110f85a58ccfa25e87e187c0f424ef97"
254254
uuid = "f55ce6ea-fdc5-4628-88c5-0087fe54bd30"
255-
version = "0.2.23"
255+
version = "0.2.25"
256256

257257
[[deps.Future]]
258258
deps = ["Random"]
259259
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
260260

261261
[[deps.GPUArrays]]
262262
deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"]
263-
git-tree-sha1 = "9ade6983c3dbbd492cf5729f865fe030d1541463"
263+
git-tree-sha1 = "745847e65e72a475716952f0a8a7258d42338ce9"
264264
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
265-
version = "8.6.6"
265+
version = "8.8.0"
266266

267267
[[deps.GPUArraysCore]]
268268
deps = ["Adapt"]
269-
git-tree-sha1 = "1cd7f0af1aa58abc02ea1d872953a97359cb87fa"
269+
git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0"
270270
uuid = "46192b85-c4d5-4398-a991-12ede77f4527"
271-
version = "0.1.4"
271+
version = "0.1.5"
272272

273273
[[deps.GenericSchur]]
274274
deps = ["LinearAlgebra", "Printf"]
@@ -284,21 +284,21 @@ version = "0.7.0"
284284

285285
[[deps.IOCapture]]
286286
deps = ["Logging", "Random"]
287-
git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a"
287+
git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6"
288288
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
289-
version = "0.2.2"
289+
version = "0.2.3"
290290

291291
[[deps.IRTools]]
292292
deps = ["InteractiveUtils", "MacroTools", "Test"]
293-
git-tree-sha1 = "0ade27f0c49cebd8db2523c4eeccf779407cf12c"
293+
git-tree-sha1 = "eac00994ce3229a464c2847e956d77a2c64ad3a5"
294294
uuid = "7869d1d1-7146-5819-86e3-90919afe41df"
295-
version = "0.4.9"
295+
version = "0.4.10"
296296

297297
[[deps.ImplicitDifferentiation]]
298298
deps = ["AbstractDifferentiation", "Krylov", "LinearOperators", "Requires"]
299-
git-tree-sha1 = "a24b7fdd24f302f452637b933c9d9ae67e18d30c"
299+
git-tree-sha1 = "60dd9979c0dcbbb77404e47ae4f83ca98e51c73b"
300300
uuid = "57b37032-215b-411a-8a7c-41a003a55207"
301-
version = "0.4.0"
301+
version = "0.4.4"
302302
weakdeps = ["ChainRulesCore", "ForwardDiff"]
303303

304304
[deps.ImplicitDifferentiation.extensions]
@@ -333,9 +333,9 @@ version = "0.21.4"
333333

334334
[[deps.Krylov]]
335335
deps = ["LinearAlgebra", "Printf", "SparseArrays"]
336-
git-tree-sha1 = "dd90aacbfb622f898a97c2a4411ac49101ebab8a"
336+
git-tree-sha1 = "0356a64062656b0cbb43c504ad5de338251f4bda"
337337
uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
338-
version = "0.9.0"
338+
version = "0.9.1"
339339

340340
[[deps.LDLFactorizations]]
341341
deps = ["AMD", "LinearAlgebra", "SparseArrays", "Test"]
@@ -345,15 +345,15 @@ version = "0.10.0"
345345

346346
[[deps.LLVM]]
347347
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"]
348-
git-tree-sha1 = "a8960cae30b42b66dd41808beb76490519f6f9e2"
348+
git-tree-sha1 = "5007c1421563108110bbd57f63d8ad4565808818"
349349
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
350-
version = "5.0.0"
350+
version = "5.2.0"
351351

352352
[[deps.LLVMExtra_jll]]
353353
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"]
354-
git-tree-sha1 = "09b7505cc0b1cee87e5d4a26eea61d2e1b0dcd35"
354+
git-tree-sha1 = "1222116d7313cdefecf3d45a2bc1a89c4e7c9217"
355355
uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab"
356-
version = "0.0.21+0"
356+
version = "0.0.22+0"
357357

358358
[[deps.LazyArtifacts]]
359359
deps = ["Artifacts", "Pkg"]
@@ -399,9 +399,9 @@ version = "2.14.0"
399399

400400
[[deps.LogExpFunctions]]
401401
deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"]
402-
git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b"
402+
git-tree-sha1 = "c3ce8e7420b3a6e071e0fe4745f5d4300e37b13f"
403403
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
404-
version = "0.3.23"
404+
version = "0.3.24"
405405

406406
[deps.LogExpFunctions.extensions]
407407
LogExpFunctionsChainRulesCoreExt = "ChainRulesCore"
@@ -428,9 +428,9 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
428428

429429
[[deps.MathOptInterface]]
430430
deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "DataStructures", "ForwardDiff", "JSON", "LinearAlgebra", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays", "SpecialFunctions", "Test", "Unicode"]
431-
git-tree-sha1 = "8e054675d393ce5866dcdd6a071075e25e21a39c"
431+
git-tree-sha1 = "5c5cd501ae1d76d3ccd7c7e6b4325a15dde7f31c"
432432
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
433-
version = "1.15.1"
433+
version = "1.18.0"
434434

435435
[[deps.MbedTLS_jll]]
436436
deps = ["Artifacts", "Libdl"]
@@ -482,10 +482,10 @@ uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
482482
version = "1.6.0"
483483

484484
[[deps.Parsers]]
485-
deps = ["Dates", "SnoopPrecompile"]
486-
git-tree-sha1 = "478ac6c952fddd4399e71d4779797c538d0ff2bf"
485+
deps = ["Dates", "PrecompileTools", "UUIDs"]
486+
git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29"
487487
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
488-
version = "2.5.8"
488+
version = "2.7.1"
489489

490490
[[deps.Pkg]]
491491
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
@@ -494,9 +494,9 @@ version = "1.9.0"
494494

495495
[[deps.PrecompileTools]]
496496
deps = ["Preferences"]
497-
git-tree-sha1 = "d0984cc886c48e5a165705ce65236dc2ec467b91"
497+
git-tree-sha1 = "9673d39decc5feece56ef3940e5dafba15ba0f81"
498498
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
499-
version = "1.1.0"
499+
version = "1.1.2"
500500

501501
[[deps.Preferences]]
502502
deps = ["TOML"]
@@ -556,12 +556,6 @@ git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac"
556556
uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46"
557557
version = "1.1.1"
558558

559-
[[deps.SnoopPrecompile]]
560-
deps = ["Preferences"]
561-
git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c"
562-
uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c"
563-
version = "1.0.3"
564-
565559
[[deps.Sockets]]
566560
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
567561

@@ -651,10 +645,10 @@ uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
651645
version = "1.2.13+0"
652646

653647
[[deps.Zygote]]
654-
deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "Random", "Requires", "SnoopPrecompile", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"]
655-
git-tree-sha1 = "987ae5554ca90e837594a0f30325eeb5e7303d1e"
648+
deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "Requires", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"]
649+
git-tree-sha1 = "5be3ddb88fc992a7d8ea96c3f10a49a7e98ebc7b"
656650
uuid = "e88e6eb3-aa80-5325-afca-941959d7151f"
657-
version = "0.6.60"
651+
version = "0.6.62"
658652

659653
[deps.Zygote.extensions]
660654
ZygoteColorsExt = "Colors"
@@ -675,7 +669,7 @@ version = "0.2.3"
675669
[[deps.libblastrampoline_jll]]
676670
deps = ["Artifacts", "Libdl"]
677671
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
678-
version = "5.7.0+0"
672+
version = "5.8.0+0"
679673

680674
[[deps.nghttp2_jll]]
681675
deps = ["Artifacts", "Libdl"]

examples/tutorial.jl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# Necessary imports
44

55
using DifferentiableFrankWolfe: DiffFW, simplex_projection
6+
using ForwardDiff: ForwardDiff
67
using FrankWolfe: UnitSimplexOracle
78
using Test: @test
8-
using Zygote: jacobian
9+
using Zygote: Zygote
910

1011
# Constructing the wrapper
1112

@@ -25,6 +26,10 @@ y_true = simplex_projection(θ)
2526

2627
# Differentiating the wrapper
2728

28-
J = jacobian(_θ -> dfw(_θ; frank_wolfe_kwargs), θ)[1]
29-
J_true = jacobian(simplex_projection, θ)[1]
30-
@test J J_true atol = 1e-3
29+
J1 = Zygote.jacobian(_θ -> dfw(_θ; frank_wolfe_kwargs), θ)[1]
30+
J1_true = Zygote.jacobian(simplex_projection, θ)[1]
31+
@test J1 J1_true atol = 1e-3
32+
33+
J2 = ForwardDiff.jacobian(_θ -> dfw(_θ; frank_wolfe_kwargs), θ)
34+
J2_true = ForwardDiff.jacobian(simplex_projection, θ)
35+
@test J2 J2_true atol = 1e-3

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ using Zygote
1616
end
1717

1818
@testset "Correctness (JET.jl)" begin
19-
if VERSION >= v"1.8"
20-
JET.test_package(DifferentiableFrankWolfe; toplevel_logger=nothing, mode=:typo)
19+
if VERSION >= v"1.9"
20+
JET.test_package(DifferentiableFrankWolfe; target_defined_modules=true)
2121
end
2222
end
2323

0 commit comments

Comments
 (0)