Skip to content

Commit

Permalink
fixing deps for ex
Browse files Browse the repository at this point in the history
  • Loading branch information
dfridovi committed Nov 26, 2024
1 parent 308d02f commit 5345739
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions examples/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[deps]
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be"
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
LazySets = "b4f0291d-fe17-52bc-9479-3d1a343d9043"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -9,3 +12,4 @@ ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
TrajectoryGamesBase = "ac1ac542-73eb-4349-ae1b-660ab3609574"
TrajectoryGamesExamples = "ff3fa34c-8d8f-519c-b5bc-31760c52507a"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
5 changes: 1 addition & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,14 @@ using FiniteDiff: FiniteDiff
unconstrained_dimension = size(M, 1),
constrained_dimension = length(b),
parameter_dimension = size(M, 1),
compute_sensitivities = true
compute_sensitivities = true,
)

function f(θ)
sol = MCPSolver.solve(MCPSolver.InteriorPoint(), mcp, θ)
#@infiltrate
sum(sol.x .^ 2) + sum(sol.y .^ 2)
end

#@infiltrate

∇_autodiff_reverse = only(Zygote.gradient(f, θ))
∇_autodiff_forward = only(Zygote.gradient-> Zygote.forwarddiff(f, θ), θ))
∇_finitediff = FiniteDiff.finite_difference_gradient(f, θ)
Expand Down

0 comments on commit 5345739

Please sign in to comment.