1#!/usr/bin/env python3 2# mypy: allow-untyped-defs 3 4# Copyright (c) Facebook, Inc. and its affiliates. 5# All rights reserved. 6# 7# This source code is licensed under the BSD-style license found in the 8# LICENSE file in the root directory of this source tree. 9 10from typing import Dict, List 11 12from torch.distributed.elastic.utils.logging import get_logger 13 14 15logger = get_logger(__name__) 16 17__all__ = ["log_debug_info_for_expired_timers"] 18 19 20def log_debug_info_for_expired_timers( 21 run_id: str, 22 expired_timers: Dict[int, List[str]], 23): 24 if expired_timers: 25 logger.info("Timers expired for run:[%s] [%s].", run_id, expired_timers) 26