Skip to content

Tracking loadings ​

On downloads and uploads, pyhectiqlab internally uses the rich package to track progression. By default, the rich.progress.Progress does not allow for multiple instances to be created throws an exception whenever this is the case. To ensure that all progress is being tracked correctly, we can pass an exciting rich.progress.Progress instance to pyhectiqlab by using the register_progress function:

python
import os
from rich.progress import Progress
from pyhectiqlab import functional as hl

os.environ["HECTIQLAB_HIDE_PROGRESS"] = False # ensures that progress is shown

with Progress() as prog:
    task = prog.add_task(total=3)
    hl.register_progress(prog)
    for _ in range(3):
        hl.download_dataset(...) # triggers the internal progress bar for the download

If we omit the line hl.register_progress(prog), the exception is captured and the script is still executed, but without tracking progression of the upload or downloads.