Skip to content

Commit

Permalink
GIVE ME MY PROGRESS BARS GOD DAMN IT
Browse files Browse the repository at this point in the history
  • Loading branch information
guipenedo committed Nov 26, 2024
1 parent 9250ccf commit 339566b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/datatrove/pipeline/dedup/fast_mh3/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ async fn process_post_union(
.unwrap()
.progress_chars("#>-"));
pb.enable_steady_tick(std::time::Duration::from_secs(1));
pb.set_draw_target(indicatif::ProgressDrawTarget::stderr());

let mut handles = Vec::new();
for file_number in files {
Expand Down Expand Up @@ -421,12 +422,16 @@ async fn main() -> Result<()> {
});

println!("Processing {} input files...", files.len());
let pb = ProgressBar::new(files.len() as u64);
let pb = ProgressBar::with_draw_target(
io::BufWriter::new(io::stdout()),
files.len() as u64,
);
pb.set_style(ProgressStyle::default_bar()
.template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {pos}/{len} ({eta})")
.unwrap()
.progress_chars("#>-"));
pb.enable_steady_tick(std::time::Duration::from_secs(1));
pb.set_draw_target(indicatif::ProgressDrawTarget::stderr());

let mut handles = Vec::new();

Expand Down

0 comments on commit 339566b

Please sign in to comment.