2e3655e8a9b1e37fa6e29f11db02a6b53cfb5928,rllib/agents/a3c/a3c_tf_policy.py,,postprocess_advantages,#Any#Any#Any#Any#,48
Before Change
if completed:
last_r = 0.0
else:
next_state = []
for i in range(policy.num_state_tensors()):
next_state.append(sample_batch["state_out_{}".format(i)][-1])
last_r = policy._value(sample_batch[SampleBatch.NEXT_OBS][-1],
sample_batch[SampleBatch.ACTIONS][-1],
sample_batch[SampleBatch.REWARDS][-1],
*next_state)
return compute_advantages(
sample_batch, last_r, policy.config["gamma"], policy.config["lambda"],
policy.config["use_gae"], policy.config["use_critic"])
After Change
episode=None):
// Stub serving backward compatibility.
deprecation_warning(
old="rllib.agents.a3c.a3c_tf_policy.postprocess_advantages",
new="rllib.evaluation.postprocessing.compute_gae_for_sample_batch",
error=False)
return compute_gae_for_sample_batch(policy, sample_batch,
other_agent_batches, episode)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: ray-project/ray
Commit Name: 2e3655e8a9b1e37fa6e29f11db02a6b53cfb5928
Time: 2021-01-19
Author: sven@anyscale.io
File Name: rllib/agents/a3c/a3c_tf_policy.py
Class Name:
Method Name: postprocess_advantages
Project Name: elbayadm/attn2d
Commit Name: fe6c2edad0c1f9130847b9a19fbbef169529b500
Time: 2020-01-10
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: __init__