Skip to content

Commit

Permalink
import as opposed to using
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn de Vos committed Nov 6, 2023
1 parent da1095c commit b368879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ensemble/basic_ensemble_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ function merge_stats(us)
reduce(merge, st)
end

mutable struct AggregateLogger{T<:AbstractLogger} <: AbstractLogger
mutable struct AggregateLogger{T<:Logging.AbstractLogger} <: Logging.AbstractLogger
progress::Dict{Symbol, Float64}
done_counter::Int
total::Float64
print_time::Float64
lock::ReentrantLock
logger::T
end
AggregateLogger(logger::AbstractLogger) = AggregateLogger(Dict{Symbol, Float64}(),0 , 0.0, 0.0, ReentrantLock(), logger)
AggregateLogger(logger::Logging.AbstractLogger) = AggregateLogger(Dict{Symbol, Float64}(),0 , 0.0, 0.0, ReentrantLock(), logger)

Check warning on line 40 in src/ensemble/basic_ensemble_solve.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/basic_ensemble_solve.jl#L40

Added line #L40 was not covered by tests

function Logging.handle_message(l::AggregateLogger, level, message, _module, group, id, file, line; kwargs...)
if convert(LogLevel, level) == LogLevel(-1) && haskey(kwargs, :progress)
Expand Down Expand Up @@ -130,7 +130,7 @@ function __solve(prob::AbstractEnsembleProblem,
ChainRulesCore.@ignore_derivatives if get(kwargs, :progress, false)
name = get(kwargs, :progress_name, "Ensemble")
for i in 1:trajectories
@logmsg(LogLevel(-1), "$name #$i", _id=Symbol("SciMLBase_$i"), progress=0)
Logging.@logmsg(LogLevel(-1), "$name #$i", _id=Symbol("SciMLBase_$i"), progress=0)
end

Check warning on line 134 in src/ensemble/basic_ensemble_solve.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/basic_ensemble_solve.jl#L130-L134

Added lines #L130 - L134 were not covered by tests
end

Expand Down

0 comments on commit b368879

Please sign in to comment.