Creates policy specs from specs loaded from disk.

The PolicySaver saves policy specs next to the saved model as a struct.StructuredValue proto. This recreates the original specs from the proto.

Pass the proto loaded from the file with tensor_spec.from_pbtxt_file() to this function.

loaded_policy_specs struct.StructuredValue proto that had been previously created by PolicySaver as a pbtxt.

A dict with specs extracted from the proto. The dict contains the following keys and values. Except time_step_spec all the specs are nests of ArraySpecs.

  • collect_data_spec: Collect data spec for the policy.
  • time_step_spec: TimeStepSpec for the policy.
  • action_spec: Action spec for the policy
  • policy_state_spec: State spec for the policy.
  • info_spec: Info spec for the policy.