Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrea committed Mar 31, 2021
1 parent 485682a commit c9e8a34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CMAEvolutionStrategy"
uuid = "8d3b24bd-414e-49e0-94fb-163cc3a3e411"
authors = ["Johanni Brea <jbrea@users.noreply.github.com>"]
version = "0.2.0"
version = "0.2.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
7 changes: 6 additions & 1 deletion src/CMAEvolutionStrategy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ function run!(o, f)
update!(o.p, y, perm)
log!(o, y, fvals, perm)
terminate!(o) && break
o.logger.verbosity > 0 && (o.stop.it < 4 || o.stop.it % 100 == 0 || time() - o.logger.times[end] > 2) && print_state(o)
if o.logger.verbosity > 0 &&
(o.stop.it < 4 ||
o.stop.it % 100 == 0 ||
time() - o.logger.times[end] > 2)
print_state(o)
end
end
if o.logger.verbosity > 0
print_state(o)
Expand Down
2 changes: 1 addition & 1 deletion src/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function print_state(o)
push!(l.times, time())
if o.stop.it == 1
print_header(o)
@printf "%6.s %8.s %14.s %9.s %10.s %9.s\n" "iter" "fevals" "function value" "sigma" "axis ratio" "time[s]"
@printf "%6s %8s %14s %9s %10s %9s\n" "iter" "fevals" "function value" "sigma" "axis ratio" "time[s]"
end
@printf "%6.d %8.d %.8e %.2e %10.3e %9.3f\n" o.stop.it o.stop.it * o.p.λ + noisefevals(o.p.noise_handling) l.fmedian[end] sigma(o.p) maximum(o.p.cov.C.sqrtvalues)/minimum(o.p.cov.C.sqrtvalues) l.times[end] - o.stop.t0
end
Expand Down

2 comments on commit c9e8a34

@jbrea
Copy link
Owner Author

@jbrea jbrea commented on c9e8a34 Mar 31, 2021

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/33263

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 v0.2.1 -m "<description of version>" c9e8a341592f7ff589d8edf41b14972c9ff8340a
git push origin v0.2.1

Please # to comment.