Skip to content

Commit b23e549

Browse files
committed
Code coverage.
1 parent 04f56a5 commit b23e549

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/plans/stepsize.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -991,10 +991,12 @@ where ``∂f`` denotes a nonzero-subgradient of ``f`` at the current iterate ``p
991991
992992
initialize the Polyak stepsize to a certain sequence and an initial estimate of ``f_{\text{best}}``.
993993
994-
$(_note(:ManifoldDefaultFactory, "NesterovRule"))
994+
$(_note(:ManifoldDefaultFactory, "PolyakStepsize"))
995995
"""
996996
function Polyak(args...; kwargs...)
997-
return ManifoldDefaultsFactory(args...; requires_manifold=false, kwargs...)
997+
return ManifoldDefaultsFactory(
998+
PolyakStepsize, args...; requires_manifold=false, kwargs...
999+
)
9981000
end
9991001

10001002
@doc """

test/plans/test_stepsize.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Manopt, Manifolds, Test
1+
using ManifoldsBase, Manopt, Manifolds, Test
22

33
@testset "Stepsize" begin
44
M = ManifoldsBase.DefaultManifold(2)
@@ -119,7 +119,7 @@ using Manopt, Manifolds, Test
119119
p = [2.0, 2.0]
120120
X = grad_f(M, p)
121121
sgs = SubGradientMethodState(M; p=p)
122-
ps = Manopt.PolyakStepsize()
122+
ps = Polyak()()
123123
@test repr(ps) ==
124124
"Polyak()\nA stepsize with keyword parameters\n * initial_cost_estimate = 0.0\n"
125125
@test ps(dmp, sgs, 1) == (f(M, p) - 0 + 1) / (norm(M, p, X)^2)

0 commit comments

Comments
 (0)