docstr: Test whether APPO can be built with both frameworks.
docstr_tok: ["Test","whether","APPO","can","be","built","with","both","frameworks","."]
code: def test_appo_compilation(self):
      """Test whether APPO can be built with both frameworks."""
      config = appo.APPOConfig().rollouts(num_rollout_workers=1)
      num_iterations = 2
  
      for _ in framework_iterator(config):
          print("w/o v-trace")
          config.vtrace = False
          algo = config.build(env="CartPole-v1")
          for i in range(num_iterations):
              results = algo.train()
              print(results)
              check_train_results(results)
  
          check_compute_single_action(algo)
          algo.stop()
  
          print("w/ v-trace")
          config.vtrace = True
          algo = config.build(env="CartPole-v1")
          for i in range(num_iterations):
              results = algo.train()
              print(results)
              check_train_results(results)
  
          check_compute_single_action(algo)
          algo.stop()
  
file_path: ray/python/ray/rllib/algorithms/appo/tests/test_appo.py
imports: import unittest
  import ray
  import ray.rllib.algorithms.appo
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.metrics.learner_info import LEARNER_INFO, LEARNER_STATS_KEY
  from ray.rllib.utils.test_utils import check_compute_single_action, check_train_results, framework_iterator
label_desc: Use image node_id 3 for calling the TestAPPO obj's underlying member method code with example usage: obj.test_appo_compilation() without return types