Skip to content

Commit

Permalink
fix logger type hint (#8359)
Browse files Browse the repository at this point in the history
  • Loading branch information
tshu-w authored Jul 13, 2021
1 parent 9d5ad76 commit ff2aed6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, trainer: 'pl.Trainer', log_gpu_memory: Optional[str] = None)

def on_trainer_init(
self,
logger: LightningLoggerBase,
logger: Union[bool, LightningLoggerBase, Iterable[LightningLoggerBase]],
flush_logs_every_n_steps: int,
log_every_n_steps: int,
move_metrics_to_cpu: bool,
Expand All @@ -66,7 +66,7 @@ def should_update_logs(self) -> bool:
should_log_every_n_steps = (self.trainer.global_step + 1) % self.trainer.log_every_n_steps == 0
return should_log_every_n_steps or self.trainer.should_stop

def configure_logger(self, logger: Union[bool, Iterable, LightningLoggerBase]) -> None:
def configure_logger(self, logger: Union[bool, LightningLoggerBase, Iterable[LightningLoggerBase]]) -> None:
if logger is True:
version = os.environ.get('PL_EXP_VERSION', self.trainer.slurm_job_id)

Expand Down

0 comments on commit ff2aed6

Please sign in to comment.