Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Copy link
Copy Markdown
Contributor

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.events is a module, so :func: will not resolve once the fragment is compiled into CHANGELOG.rst; likewise :class:tqdm targets 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.

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
Expand Up @@ -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__)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Implementation — Logger assignment splits the import block

_log = logging.getLogger(__name__) is inserted between the third-party imports and the isaaclab imports, so module-level executable code now precedes imports. This breaks PEP 8 import ordering (E402) and leaves isort with two disjoint import sections, which can churn under the formatting hooks. Move the logger definition below the final import block.


import isaaclab.sim as sim_utils
from isaaclab import cloner
from isaaclab.managers import EventTermCfg, ManagerTermBase, ManagerTermBaseCfg, SceneEntityCfg
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Loading