-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix tqdm progress bar rendering in GitHub Actions logs #6949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
9329d2e
3148ab7
6829d90
b5c4062
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Fixed | ||
| ^^^^^ | ||
|
|
||
| * Fixed the "Prefilling reset buffer" progress bar in | ||
| :func:`~isaaclab_tasks.core.lift.mdp.events` rendering as garbled block | ||
| characters in GitHub Actions logs. The :class:`tqdm` bar is now disabled when | ||
| ``stderr`` is not a TTY; a plain :mod:`logging` message is emitted at the | ||
| start and on completion so CI logs still show meaningful progress. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,13 +7,17 @@ | |
|
|
||
| from __future__ import annotations | ||
|
|
||
| import logging | ||
| import sys | ||
| from typing import TYPE_CHECKING | ||
|
|
||
| import numpy as np | ||
| import torch | ||
| import warp as wp | ||
| from tqdm import tqdm | ||
|
|
||
| _log = logging.getLogger(__name__) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Warning · Implementation — Logger assignment splits the import block
|
||
|
|
||
| import isaaclab.sim as sim_utils | ||
| from isaaclab import cloner | ||
| from isaaclab.managers import EventTermCfg, ManagerTermBase, ManagerTermBaseCfg, SceneEntityCfg | ||
|
|
@@ -368,11 +372,13 @@ def roll_once(roll_ids: torch.Tensor) -> torch.Tensor: | |
| # not cover all groups, and a group with no rolled envs could never fill | ||
| all_ids = torch.arange(env.num_envs, device=env.device) | ||
|
|
||
| _log.info("Prefilling reset buffer: 0/%d states", num_groups * harvest_size) | ||
| with tqdm( | ||
| total=num_groups * harvest_size, | ||
| desc="Prefilling reset buffer", | ||
| unit="state", | ||
| dynamic_ncols=True, | ||
| disable=not sys.stderr.isatty(), | ||
| ) as progress: | ||
| while not bool((self._fill >= harvest_size).all()): | ||
| if max_prefill_iters is not None and iteration >= max_prefill_iters: | ||
|
|
@@ -414,6 +420,7 @@ def roll_once(roll_ids: torch.Tensor) -> torch.Tensor: | |
| self._descriptor[row : row + len(take)] = feature | ||
| self._fill[group] += len(take) | ||
| progress.update(len(take)) | ||
| _log.info("Prefilling reset buffer: done (%d states)", num_groups * harvest_size) | ||
| if diversity_feature is not None: | ||
| self._keep_most_spread(num_groups, harvest_size, buffer_size_per_group) | ||
| if success_monitor is not None: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Warning · Implementation — Incorrect Sphinx roles in changelog fragment
isaaclab_tasks.core.lift.mdp.eventsis a module, so:func:will not resolve once the fragment is compiled intoCHANGELOG.rst; likewise:class:tqdmtargets an external package with no such documented class. Use `:mod:` for the module and plain literal markup (tqdm``) for the third-party library to avoid broken references in the generated changelog.