Skip to content

Commit

Permalink
add optional progress meter to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Mar 21, 2024
1 parent 9045343 commit 84c7058
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mllam_data_prep/__main__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
from pathlib import Path

from dask.diagnostics import ProgressBar

from .create_dataset import main

if __name__ == "__main__":
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("config", help="Path to the config file", type=Path)
parser.add_argument(
"--show-progress", help="Show progress bar", action="store_true"
)
args = parser.parse_args()

if args.show_progress:
ProgressBar().register()

main(fp_config=args.config)

0 comments on commit 84c7058

Please sign in to comment.