class_docstr: ValueDice Builder.
  
  This builder is an entry point for online version of ValueDice.
  For offline please use the ValueDiceLearner directly.
class_docstr_tok: ["ValueDice","Builder",".","This","builder","is","an","entry","point","for","online","version","of","ValueDice",".","For","offline","please","use","the","ValueDiceLearner","directly","."]
code: def make_learner(
      self,
      random_key: networks_lib.PRNGKey,
      networks: value_dice_networks.ValueDiceNetworks,
      dataset: Iterator[reverb.ReplaySample],
      logger_fn: loggers.LoggerFactory,
      environment_spec: specs.EnvironmentSpec,
      replay_client: Optional[reverb.Client] = None,
      counter: Optional[counting.Counter] = None,
  ) -> core.Learner:
      del environment_spec, replay_client
      iterator_demonstration = self._make_demonstrations(
          self._config.batch_size * self._config.num_sgd_steps_per_step
      )
      policy_optimizer = optax.adam(
          learning_rate=self._config.policy_learning_rate
      )
      nu_optimizer = optax.adam(
          learning_rate=self._config.nu_learning_rate
      )
      return learning.ValueDiceLearner(
          networks=networks,
          policy_optimizer=policy_optimizer,
          nu_optimizer=nu_optimizer,
          discount=self._config.discount,
          rng=random_key,
          alpha=self._config.alpha,
          policy_reg_scale=self._config.policy_reg_scale,
          nu_reg_scale=self._config.nu_reg_scale,
          num_sgd_steps_per_step=self._config.num_sgd_steps_per_step,
          iterator_replay=dataset,
          iterator_demonstrations=iterator_demonstration,
          logger=logger_fn("learner"),
          counter=counter,
      )
  
imports: from typing import Callable, Iterator, List, Optional
  from acme import adders
  from acme import core
  from acme import specs
  from acme import types
  from acme.adders import reverb
  from acme.agents.jax import actor_core
  from acme.agents.jax import actors
  from acme.agents.jax import builders
  from acme.agents.jax.value_dice import config
  from acme.agents.jax.value_dice import learning
  from acme.agents.jax.value_dice import networks
  from acme.datasets import reverb
  from acme.jax import networks
  from acme.jax import utils
  from acme.jax import variable_utils
  from acme.utils import counting
  from acme.utils import loggers
  import jax
  import optax
  import reverb
  from reverb import rate_limiters
label_desc: Use image node_id 2 for calling the ValueDiceBuilder obj's underlying member method code with example usage: obj.make_learner(random_key, networks, dataset, logger_fn, environment_spec, replay_client, counter) and returns: learning