Skip to content

Detect when running under a non-interactive session and do not display progress bar #257

@hexylena

Description

@hexylena

It really fills up the stderr.txt

$ du -h *
32K     command
32K     error.json
32K     inputs.json
32K     slurm-23041630.out
32K     slurm_singularity.log.txt
216K    stderr.txt

The job died due to timeout, but I always start by looking in the stderr for relevant messages, here the signal to noise ratio is a bit low

(newlines inserted manually, less doesn't handle control characters)

Processing 392b181d6b_hg38.bam:  48%|████▊     | 63.3G/131G [59:04<1:31:36, 13.1MiB/s]^M
Processing 392b181d6b_hg38.bam:  48%|████▊     | 63.3G/131G [59:04<1:28:38, 13.6MiB/s]^M
Processing 392b181d6b_hg38.bam:  48%|████▊     | 63.3G/131G [59:04<1:26:01, 14.0MiB/s]^M
Processing 392b181d6b_hg38.bam:  49%|████▊     | 63.3G/131G [59:05<1:23:08, 14.5MiB/s]^M

It seems tqdm doesn't do this automatically and someone makes a community replacement but that seems.. suspect at best, so maybe it's possible to detect easily and just toggle it off in that case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions