230503ac56636d91d53d728c247c6ea3d096eeb9,tf_agents/environments/tf_py_environment_test.py,TFPYEnvironmentTest,testTwoStepsDependenceOnTheFirst,#TFPYEnvironmentTest#Any#,250

Before Change


    self.assertEqual([2], time_step.observation)
    self.assertEqual(1., time_step.reward)
    self.assertEqual(0., time_step.discount)
    self.assertEqual(np.array([0]), step_data)
    self.assertEqual([1, 2], py_env.actions_taken)

  @parameterized.parameters({"batch_py_env": True}, {"batch_py_env": False})
  def testFirstObservationIsPreservedAfterTwoSteps(self, batch_py_env):

After Change


    else:
      tf_env = tf_py_environment.TFPyEnvironment(py_env)
    time_step = tf_env.current_time_step()
    with tf.control_dependencies([time_step.step_type]):
      action = tf.constant([1])
    time_step = tf_env.step(action)
    with tf.control_dependencies([time_step.step_type]):
      action = tf.constant([2])
    time_step = self.evaluate(tf_env.step(action))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: tensorflow/agents
Commit Name: 230503ac56636d91d53d728c247c6ea3d096eeb9
Time: 2018-11-30
Author: sguada@google.com
File Name: tf_agents/environments/tf_py_environment_test.py
Class Name: TFPYEnvironmentTest
Method Name: testTwoStepsDependenceOnTheFirst


Project Name: THUNLP-MT/THUMT
Commit Name: 161eec75e3ce12307e74553f4360064b32bdc4fc
Time: 2017-12-31
Author: playinf@stu.xmu.edu.cn
File Name: thumt/bin/trainer.py
Class Name:
Method Name: main


Project Name: tensorflow/agents
Commit Name: 230503ac56636d91d53d728c247c6ea3d096eeb9
Time: 2018-11-30
Author: sguada@google.com
File Name: tf_agents/environments/tf_py_environment_test.py
Class Name: TFPYEnvironmentTest
Method Name: testOneStep


Project Name: tensorflow/magenta
Commit Name: c9c240886c6aa67496f6030b54ed4cab260e0415
Time: 2019-05-02
Author: jesseengel@google.com
File Name: magenta/models/onsets_frames_transcription/data.py
Class Name:
Method Name: _provide_data