Skip to content

Commit

Permalink
Updated API for ProgressMeter >= 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvaticus committed Oct 2, 2023
1 parent c336615 commit bb4d5f6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ LoopVectorization = "0.12"
MLJModelInterface = "1.3.3"
PDMats = "0.9, 0.10, 0.11"
PrecompileTools = "1"
ProgressMeter = "1.3"
ProgressMeter = "1.8"
Reexport = "0.2, 1.0"
StableRNGs = "1.0"
StaticArrays = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/Nn/Nn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ function train!(nn::NN,x,y; epochs=100, batch_size=min(size(x,1),32), sequential
showTime = 0.2
end

@showprogress showTime "Training the Neural Network..." for t in 1:epochs
@showprogress dt=showTime desc="Training the Neural Network..." for t in 1:epochs
batches = batch(n,batch_size,sequential=sequential,rng=rng)
n_batches = length(batches)
#if t == 1 # removed otherwise the array of losses/pars would be nepochs+1
Expand Down
2 changes: 1 addition & 1 deletion src/Perceptron/Perceptron_kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function kernelPerceptronBinary(x, y; K=radial_kernel, T=1000, α=zeros(Int64,le
showTime = 0.2
end

@showprogress showTime "Training Kernel Perceptron..." for t in 1:T
@showprogress dt=showTime desc="Training Kernel Perceptron..." for t in 1:T
ϵ = 0
if shuffle
# random shuffle x, y and alpha
Expand Down
2 changes: 1 addition & 1 deletion src/Perceptron/Perceptron_pegasos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function pegasosBinary(x, y; θ=zeros(size(x,2)),θ₀=0.0, λ=0.5,η= (t -> 1/s
lastϵ = Inf
if force_origin θ₀ = 0.0; end
sumθ = θ; sumθ₀ = θ₀
@showprogress 1 "Training PegasosClassifier..." for t in 1:T
@showprogress dt=1 desc="Training PegasosClassifier..." for t in 1:T
ϵ = 0
ηₜ = η(t)
if shuffle
Expand Down
4 changes: 3 additions & 1 deletion src/Precompilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@compile_workload begin
# all calls in this block will be precompiled, regardless of whether
# they belong to your package or not (on Julia 1.8 and higher)
@info "Beginning BetaML PrecompileTool workflow...."
yoh = fit!(OneHotEncoder(verbosity=NONE),ycat)
fit!(NeuralNetworkEstimator(verbosity=NONE,epochs=10),x,y)
fit!(NeuralNetworkEstimator(verbosity=NONE,epochs=10),x,yoh)
Expand All @@ -18,5 +19,6 @@
fit!(KMeansClusterer(verbosity=NONE),x)
fit!(KMedoidsClusterer(verbosity=NONE),x)
fit!(GMMClusterer(verbosity=NONE,tol=0.01),x)
@info "...done BetaML PrecompileTool workflow."
end
end
end

0 comments on commit bb4d5f6

Please sign in to comment.