class_docstr: Logger to register as callback in an optimizer, for Logging
  best point regularly.
  
  Parameters
  ----------
  logger:
      given logger that callback will use to log
  log_level:
      log level that logger will write to
  log_interval_tells: int
      max number of evaluation before performing another log
  log_interval_seconds:
      max number of seconds before performing another log
class_docstr_tok: ["Logger","to","register","as","callback","in","an","optimizer",",","for","Logging","best","point","regularly",".","Parameters","--","--","--","--","--","logger",":","given","logger","that","callback","will","use","to","log","log_level",":","log","level","that","logger","will","write","to","log_interval_tells",":","int","max","number","of","evaluation","before","performing","another","log","log_interval_seconds",":","max","number","of","seconds","before","performing","another","log"]
code: def __call__(
      self, optimizer: base.Optimizer, *args: tp.Any, **kwargs: tp.Any
  ) -> None:
      if (
          time.time() >= self._next_time
          or self._next_tell >= optimizer.num_tell
      ):
          self._next_time = time.time() + self._log_interval_seconds
          self._next_tell = (
              optimizer.num_tell + self._log_interval_tells
          )
          if optimizer.num_objectives == 1:
              x = optimizer.provide_recommendation()
              self._logger.log(
                  self._log_level,
                  "After %s, recommendation is %s",
                  optimizer.num_tell,
                  x,
              )
          else:
              losses = optimizer._hypervolume_pareto.get_min_losses()  # type: ignore
              self._logger.log(
                  self._log_level,
                  "After %s, the respective minimum loss for each objective in the pareto front is %s",
                  optimizer.num_tell,
                  losses,
              )
  
imports: import json
  import time
  import warnings
  import inspect
  import datetime
  import logging
  from pathlib import Path
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from nevergrad.parametrization import parameter
  from nevergrad.parametrization import helpers
  from .None import base
label_desc: Use image node_id 2 for calling the OptimizationLogger obj's underlying member method code with example usage: obj.__call__(optimizer) without return types