8426825800af370988e50f5105ffce53f384de91,tf_agents/policies/random_tf_policy_test.py,RandomTFPolicyTest,testInfoSpec,#RandomTFPolicyTest#Any#,188

Before Change


        "PolicyInfo",
        ("log_probability", "predicted_rewards"))
    // Set default empty tuple for all fields.
    PolicyInfo.__new__.__defaults__ = ((),) * len(PolicyInfo._fields)

    action_spec = [
        tensor_spec.BoundedTensorSpec((2, 3), dtype, -10, 10),

After Change



    // Test with batch, we should see the additional outer batch dim for both
    // `action` and `info`.
    batch_size = 2
    batched_time_step = self.create_batch(time_step, batch_size)
    batched_action_step = policy.action(batched_time_step)
    tf.nest.assert_same_structure(action_spec, batched_action_step.action)
    self.assertEqual((batch_size, 2, 3,), batched_action_step.action[0].shape)
    self.assertEqual((batch_size, 1, 2,), batched_action_step.action[1].shape)
    tf.nest.assert_same_structure(info_spec, batched_action_step.info)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/agents
Commit Name: 8426825800af370988e50f5105ffce53f384de91
Time: 2019-11-21
Author: no-reply@google.com
File Name: tf_agents/policies/random_tf_policy_test.py
Class Name: RandomTFPolicyTest
Method Name: testInfoSpec


Project Name: tensorflow/agents
Commit Name: fe3101f5a5b02e9e7b4ddb260cda15b05cfb6dd7
Time: 2019-11-19
Author: no-reply@google.com
File Name: tf_agents/policies/random_tf_policy_test.py
Class Name: RandomTFPolicyTest
Method Name: testInfoSpec


Project Name: tensorflow/agents
Commit Name: 49d8d4708eff5db085b8a6d5ee7c08972019a1e0
Time: 2019-08-16
Author: wun@google.com
File Name: tf_agents/agents/dqn/dqn_agent.py
Class Name: DdqnAgent
Method Name: _compute_next_q_values