class_docstr: PWIL Agent builder.
class_docstr_tok: ["PWIL","Agent","builder","."]
docstr: Initialize the agent.
  
  Args:
    rl_agent: the standard RL algorithm.
    config: PWIL-specific configuration.
    demonstrations_fn: A function that returns an iterator over contiguous
      demonstration transitions, and the average demonstration episode length.
docstr_tok: ["Initialize","the","agent",".","Args",":","rl_agent",":","the","standard","RL","algorithm",".","config",":","PWIL-specific","configuration",".","demonstrations_fn",":","A","function","that","returns","an","iterator","over","contiguous","demonstration","transitions",",","and","the","average","demonstration","episode","length","."]
code: def __init__(
      self,
      rl_agent: builders.ActorLearnerBuilder[
          DirectRLNetworks, DirectPolicyNetwork, reverb.ReplaySample
      ],
      config: pwil_config.PWILConfig,
      demonstrations_fn: Callable[[], pwil_config.PWILDemonstrations],
  ):
      """Initialize the agent.
  
      Args:
        rl_agent: the standard RL algorithm.
        config: PWIL-specific configuration.
        demonstrations_fn: A function that returns an iterator over contiguous
          demonstration transitions, and the average demonstration episode length.
      """
      self._rl_agent = rl_agent
      self._config = config
      self._demonstrations_fn = demonstrations_fn
      super().__init__()
  
imports: import threading
  from typing import Callable, Generic, Iterator, List, Optional, Sequence
  from acme import adders
  from acme import core
  from acme import specs
  from acme import types
  from acme.agents.jax import builders
  from acme.agents.jax.pwil import adder
  from acme.agents.jax.pwil import config
  from acme.agents.jax.pwil import rewarder
  from acme.jax import networks
  from acme.jax.imitation_learning_types import DirectPolicyNetwork, DirectRLNetworks
  from acme.jax.types import PRNGKey
  from acme.utils import counting
  from acme.utils import loggers
  import dm_env
  import numpy
  import reverb
label_desc: Use image node_id 1 to create a new PWILBuilder object from inherited base classes: builders.ActorLearnerBuilder, Generic with example: obj = PWILBuilder(rl_agent, config, demonstrations_fn)