class_docstr: Program definition for distributional (MoG) MPO.
class_docstr_tok: ["Program","definition","for","distributional","(","MoG",")","MPO","."]
docstr: The evaluation process.
docstr_tok: ["The","evaluation","process","."]
code: def evaluator(
      self,
      variable_source: acme.VariableSource,
      counter: counting.Counter,
  ):
      """The evaluation process."""
  
      # Create environment and target networks to act with.
      environment = self._environment_factory(True)
      agent_networks = self._network_factory(self._environment_spec)
  
      # Create a stochastic behavior policy.
      evaluator_network = snt.Sequential(
          [
              agent_networks["observation"],
              agent_networks["policy"],
              networks.StochasticMeanHead(),
          ]
      )
  
      # Create the variable client responsible for keeping the actor up-to-date.
      variable_client = tf2_variable_utils.VariableClient(
          variable_source,
          variables={"policy": evaluator_network.variables},
          update_period=1000,
      )
  
      # Make sure not to evaluate a random actor by assigning variables before
      # running the environment loop.
      variable_client.update_and_wait()
  
      # Create the agent.
      evaluator = actors.FeedForwardActor(
          policy_network=evaluator_network,
          variable_client=variable_client,
      )
  
      # Create logger and counter.
      counter = counting.Counter(counter, "evaluator")
      logger = loggers.make_default_logger(
          "evaluator", time_delta=self._log_every
      )
  
      # Create the run loop and return it.
      return acme.EnvironmentLoop(
          environment, evaluator, counter, logger
      )
  
imports: from typing import Callable, Dict, Optional
  import acme
  from acme import datasets
  from acme import specs
  from acme.adders import reverb
  from acme.agents.tf import actors
  from acme.agents.tf.mog_mpo import learning
  from acme.tf import networks
  from acme.tf import savers
  from acme.tf import variable_utils
  from acme.utils import counting
  from acme.utils import loggers
  from acme.utils import lp_utils
  import dm_env
  import launchpad
  import reverb
  import sonnet
label_desc: Use image node_id 7 for calling the DistributedMoGMPO obj's underlying member method code with example usage: obj.evaluator(variable_source, counter) and returns: acme