(self, deg_obs, deg_action, checkpoint_path, goal_state=None, should_hash=False)
We can save just the policy if we are only interested in running forward at a later point
        without needing a policy optimization class. Useful for debugging and deploying.
We can save just the policy if we are only interested in running forward at a later point
        without needing a policy optimization class. Useful for debugging and deploying.
We can save just the policy if we are only interested in running forward at a later point without needing a policy optimization class . Useful for debugging and deploying .
def pickle_policy(self, deg_obs, deg_action, checkpoint_path, goal_state=None, should_hash=False):
        """
        We can save just the policy if we are only interested in running forward at a later point
        without needing a policy optimization class. Useful for debugging and deploying.
        """
        if should_hash is True:
            hash_str = str(uuid.uuid4())
            checkpoint_path += hash_str
        os.mkdir(checkpoint_path + '/')
        checkpoint_path += '/_pol'
        pickled_pol = {'deg_obs': deg_obs, 'deg_action': deg_action, 'chol_pol_covar': self.chol_pol_covar,
                       'checkpoint_path_tf': checkpoint_path + '_tf_data', 'scale': self.scale, 'bias': self.bias,
                       'device_string': self.device_string, 'goal_state': goal_state, 'x_idx': self.x_idx}
        pickle.dump(pickled_pol, open(checkpoint_path, "wb"))
        saver = tf.train.Saver()
        saver.save(self.sess, checkpoint_path + '_tf_data')
def pickle_policy ( self , deg_obs , deg_action , checkpoint_path , goal_state = None , should_hash = False ) : if should_hash is True : hash_str = str ( uuid . uuid4 ( ) ) checkpoint_path += hash_str os . mkdir ( checkpoint_path + '/' ) checkpoint_path += '/_pol' pickled_pol = { 'deg_obs' : deg_obs , 'deg_action' : deg_action , 'chol_pol_covar' : self . chol_pol_covar , 'checkpoint_path_tf' : checkpoint_path + '_tf_data' , 'scale' : self . scale , 'bias' : self . bias , 'device_string' : self . device_string , 'goal_state' : goal_state , 'x_idx' : self . x_idx } pickle . dump ( pickled_pol , open ( checkpoint_path , "wb" ) ) saver = tf . train . Saver ( ) saver . save ( self . sess , checkpoint_path + '_tf_data' )