class_docstr: Abstract learner object.
  
  This corresponds to an object which implements a learning loop. A single step
  of learning should be implemented via the `step` method and this step
  is generally interacted with via the `run` method which runs update
  continuously.
  
  All objects implementing this interface should also be able to take in an
  external dataset (see acme.datasets) and run updates using data from this
  dataset. This can be accomplished by explicitly running `learner.step()`
  inside a for/while loop or by using the `learner.run()` convenience function.
  Data will be read from this dataset asynchronously and this is primarily
  useful when the dataset is filled by an external process.
class_docstr_tok: ["Abstract","learner","object",".","This","corresponds","to","an","object","which","implements","a","learning","loop",".","A","single","step","of","learning","should","be","implemented","via","the","`","step","`","method","and","this","step","is","generally","interacted","with","via","the","`","run","`","method","which","runs","update","continuously",".","All","objects","implementing","this","interface","should","also","be","able","to","take","in","an","external","dataset","(","see","acme.datasets",")","and","run","updates","using","data","from","this","dataset",".","This","can","be","accomplished","by","explicitly","running","`","learner.step","(",")","`","inside","a","for\/while","loop","or","by","using","the","`","learner.run","(",")","`","convenience","function",".","Data","will","be","read","from","this","dataset","asynchronously","and","this","is","primarily","useful","when","the","dataset","is","filled","by","an","external","process","."]
docstr: Run the update loop; typically an infinite loop which calls step.
docstr_tok: ["Run","the","update","loop",";","typically","an","infinite","loop","which","calls","step","."]
code: def run(self, num_steps: Optional[int] = None) -> None:
      """Run the update loop; typically an infinite loop which calls step."""
  
      iterator = (
          range(num_steps)
          if num_steps is not None
          else itertools.count()
      )
  
      for _ in iterator:
          self.step()
  
imports: import abc
  import itertools
  from typing import Generic, Iterator, List, Optional, Sequence, TypeVar
  from acme import types
  from acme.utils import metrics
  import dm_env
label_desc: Use image node_id 2 for calling the Learner obj's underlying member method code with example usage: obj.run(num_steps) without return types