class_docstr: Tests V-trace-v2 against ground truth data calculated.
  
  There is a ground truth implementation that we used to test our original
  implementation against. This test checks that the new implementation still
  matches the ground truth test from our first implementation of V-Trace.
class_docstr_tok: ["Tests","V-trace-v2","against","ground","truth","data","calculated",".","There","is","a","ground","truth","implementation","that","we","used","to","test","our","original","implementation","against",".","This","test","checks","that","the","new","implementation","still","matches","the","ground","truth","test","from","our","first","implementation","of","V-Trace","."]
code: def test_vtrace_tf2(self):
      output_tf2_vtrace = vtrace_tf2(
          behaviour_action_log_probs=tf.convert_to_tensor(
              self.behavior_log_probs_time_major
          ),
          target_action_log_probs=tf.convert_to_tensor(
              self.target_log_probs_time_major
          ),
          discounts=tf.convert_to_tensor(self.discounts_time_major),
          rewards=tf.convert_to_tensor(self.rewards_time_major),
          values=tf.convert_to_tensor(self.values_time_major),
          bootstrap_value=tf.convert_to_tensor(self.bootstrap_value),
          clip_rho_threshold=self.clip_rho_threshold,
          clip_pg_rho_threshold=self.clip_pg_rho_threshold,
      )
      check(output_tf2_vtrace, self.ground_truth_v)
  
file_path: ray/python/ray/rllib/algorithms/impala/tests/test_vtrace_v2.py
imports: import unittest
  import numpy
  from gymnasium.spaces import Box, Discrete
  from ray.rllib.algorithms.impala.tf.vtrace_tf_v2 import vtrace_tf2, make_time_major
  from ray.rllib.algorithms.impala.torch.vtrace_torch_v2 import vtrace_torch
  from ray.rllib.algorithms.impala.tests.test_vtrace import _ground_truth_vtrace_calculation
  from ray.rllib.utils.torch_utils import convert_to_torch_tensor
  from ray.rllib.models.tf.tf_action_dist import Categorical
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 2 for calling the TestVtraceRLModule obj's underlying member method code with example usage: obj.test_vtrace_tf2() without return types