Skip to content

fix: show days for long ETA durations#210

Draft
masahiro-kubota wants to merge 1 commit into
leggedrobotics:mainfrom
masahiro-kubota:fix-eta-duration-format
Draft

fix: show days for long ETA durations#210
masahiro-kubota wants to merge 1 commit into
leggedrobotics:mainfrom
masahiro-kubota:fix-eta-duration-format

Conversation

@masahiro-kubota
Copy link
Copy Markdown

@masahiro-kubota masahiro-kubota commented May 16, 2026

Description

Fix duration formatting in training logs when elapsed time or ETA exceeds 24 hours. The previous %H:%M:%S formatting drops the day count, so an ETA around 2 days 22 hours can appear as only 22:xx:xx.

Reproduction

From this branch:

python - <<'PY'
import importlib.util
import pathlib
import torch

logger_path = pathlib.Path("rsl_rl/utils/logger.py")
spec = importlib.util.spec_from_file_location("rsl_rl_logger", logger_path)
logger_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(logger_module)
Logger = logger_module.Logger

class DummyWriter:
    def add_scalar(self, *args, **kwargs):
        pass

logger = Logger(
    log_dir=".",
    cfg={"algorithm": {"rnd_cfg": None}, "num_steps_per_env": 24},
    env_cfg={},
    num_envs=10240,
    is_distributed=False,
    gpu_world_size=1,
    gpu_global_rank=0,
    device="cpu",
)
logger.writer = DummyWriter()
logger.logger_type = "tensorboard"
logger.tot_time = 7 * 3600 + 2 * 60 + 10.427
logger.log(
    it=4540,
    start_it=0,
    total_it=50000,
    collect_time=5.287,
    learn_time=0.286,
    loss_dict={"value_function": 13.0612},
    learning_rate=0.0,
    action_std=torch.tensor([0.29]),
    rnd_weight=None,
    print_minimal=True,
)
PY

Test performed

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/utils/test_logger.py -q
  • Ran the reproduction command above after the fix and confirmed the ETA prints as 2 days, 22:27:13 instead of wrapping to 22:27:13.

@masahiro-kubota masahiro-kubota changed the title Show days for long ETA durations fix: show days for long ETA durations May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant