From e76a16389ba465232d346dc05999c38299bf89f4 Mon Sep 17 00:00:00 2001 From: Spencer Wyant <17836774+swyant@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:07:26 -0500 Subject: [PATCH] adding ProgressBar to ooc_learn --- src/Learning/linear-learn.jl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Learning/linear-learn.jl b/src/Learning/linear-learn.jl index 081658b..5e2252a 100644 --- a/src/Learning/linear-learn.jl +++ b/src/Learning/linear-learn.jl @@ -306,7 +306,8 @@ function ooc_learn!( λ::Union{Real,Nothing} = 0.01, reg_style::Symbol = :default, AtWA = nothing, - AtWb = nothing + AtWb = nothing, + pbar = true ) basis_size = length(lb.basis) @@ -317,9 +318,13 @@ function ooc_learn!( W = zeros(1,1) - configs = get_system.(ds_train) + if pbar + iter = ProgressBar(ds_train) + else + iter = ds_train + end - for config in ds_train + for config in iter ref_energy = get_values(get_energy(config)) ref_forces = reduce(vcat,get_values(get_forces(config)))