Skip to content

Commit 38cd7de

Browse files
Fix early stopping in StopWhenRepeated (#558)
* fix early stopping in StopWhenRepeated * changelog * bump version
1 parent b4d1ada commit 38cd7de

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The file was started with Version `0.4`.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9-
## [Unreleased]
9+
## [0.5.30] December 10, 2025
1010

1111
### Added
1212

@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
### Fixed
1717

1818
* fixed a few typos in the documentation (#557)
19+
* fixed a bug in `StopWhenRepeated` where it stopped already at initialisation if the interior stopping criterion was satisfied (#558)
1920

2021
## [0.5.29] November 26, 2025
2122

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Manopt"
22
uuid = "0fc0a36d-df90-57f3-8f93-d78a9fc72bb5"
33
authors = ["Ronny Bergmann <manopt@ronnybergmann.net>"]
4-
version = "0.5.29"
4+
version = "0.5.30"
55

66
[deps]
77
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"

src/plans/stopping_criterion.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,6 @@ function (c::StopWhenRepeated)(
13361336
if k <= 0 # reset on init
13371337
c.count = zero(c.count)
13381338
c.at_iteration = -1
1339-
return c.stopping_criterion(p, s, k) # reset the criterion
13401339
end
13411340
# evaluate the inner stopping criterion
13421341
stop = c.stopping_criterion(p, s, k)
@@ -1355,7 +1354,7 @@ function get_reason(sc::StopWhenRepeated)
13551354
has_stopped = (sc.at_iteration >= 0)
13561355
if (sc.at_iteration >= 0)
13571356
s = has_stopped ? "reached" : "not reached"
1358-
c = sc.consecutive ? "consecutive " : ""
1357+
c = sc.consecutive ? "consecutive" : ""
13591358
# we can only get the last reason, unless we do more allocations
13601359
r = """At iteration $(sc.at_iteration), the stopping criterion $(typeof(sc.stopping_criterion)) has indicated to stop $(sc.n) $(c) times:
13611360
$(sc.count)$(sc.n): $(s)

0 commit comments

Comments
 (0)