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 this task from file.
docstr_tok: ["Initialize","this","task","from","file","."]
code: def init_from_file(self, file_name):
      """Initialize this task from file."""
      dictionary = training.unpickle_from_file(file_name, gzip=False)
      self._n_trajectories = dictionary["n_trajectories"]
      self._n_interactions = dictionary["n_interactions"]
      self._max_steps = dictionary["max_steps"]
      self._gamma = dictionary["gamma"]
      epochs_to_load = dictionary["all_epochs"][
          -self._n_replay_epochs :
      ]
  
      for epoch in epochs_to_load:
          trajectories = training.unpickle_from_file(
              self._epoch_filename(file_name, epoch), gzip=True
          )
          self._trajectories[epoch] = trajectories
      self._saved_epochs_unchanged = epochs_to_load
  
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 14 for calling the RLTask obj's underlying member method code with example usage: obj.init_from_file(file_name) without return types