class_docstr: A RL task: environment and a collection of trajectories.
class_docstr_tok: ["A","RL","task",":","environment","and","a","collection","of","trajectories","."]
docstr: Initialize trajectories task from file.
docstr_tok: ["Initialize","trajectories","task","from","file","."]
code: def load_initial_trajectories_from_path(
      self,
      initial_trajectories_path,
      dictionary_file="trajectories.pkl",
      start_epoch_to_load=0,
  ):
      """Initialize trajectories task from file."""
      # We assume that this is a dump generated by Trax
      dictionary_file = os.path.join(
          initial_trajectories_path, dictionary_file
      )
      dictionary = training.unpickle_from_file(
          dictionary_file, gzip=False
      )
      # TODO(henrykm): as currently implemented this accesses only
      # at most the last n_replay_epochs - this should be more flexible
      epochs_to_load = dictionary["all_epochs"][start_epoch_to_load:]
  
      all_trajectories = []
      for epoch in epochs_to_load:
          trajectories = training.unpickle_from_file(
              self._epoch_filename(dictionary_file, epoch), gzip=True
          )
          all_trajectories += trajectories
      return all_trajectories
  
imports: import collections
  import os
  import gin
  import gym
  import numpy
  from trax import fastmath
  from trax.rl import advantages
  from trax.supervised import training
label_desc: Use image node_id 13 for calling the RLTask obj's underlying member method code with example usage: obj.load_initial_trajectories_from_path(initial_trajectories_path, dictionary_file, start_epoch_to_load) and returns: all_trajectories