Progress tracking utilities for long-running operations.
Provides progress bars and tracking for pipeline stages, data processing, and other operations that process large amounts of data.
ProgressTracker
¶
Wraps tqdm to provide consistent progress tracking across the package.
| Attributes: |
|
|---|
__init__(total=None, desc='Processing', unit='items', disable=False)
¶
Initialize progress tracker.
| Parameters: |
|
|---|
update(n=1)
¶
Update progress by n items.
| Parameters: |
|
|---|
set_description(desc)
¶
Update the description text.
| Parameters: |
|
|---|
set_postfix(**kwargs)
¶
Set postfix statistics to display.
| Parameters: |
|
|---|
close()
¶
Close the progress bar.
__enter__()
¶
Context manager entry.
__exit__(exc_type, exc_val, exc_tb)
¶
Context manager exit.
StageProgress
¶
Track progress through multiple pipeline stages.
| Attributes: |
|
|---|
__init__(stages, disable=False)
¶
Initialize stage progress tracker.
| Parameters: |
|
|---|
start()
¶
Start tracking overall pipeline progress.
start_stage(stage_name, total_items=None)
¶
Start a new pipeline stage.
| Parameters: |
|
|---|
update_stage(n=1)
¶
Update progress within the current stage.
| Parameters: |
|
|---|
end_stage()
¶
Complete the current stage and move to the next.
finish()
¶
Finish tracking and close all progress bars.
__enter__()
¶
Context manager entry.
__exit__(exc_type, exc_val, exc_tb)
¶
Context manager exit.
track_progress(iterable, desc='Processing', total=None, unit='items', disable=False)
¶
Wrap an iterable with a progress bar.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Examples:
parallel_progress(func, items, desc='Processing', n_workers=4, disable=False)
¶
Process items in parallel with a progress bar.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Examples: