docstr: Test whether an ARSAlgorithm can be built on all frameworks.
docstr_tok: ["Test","whether","an","ARSAlgorithm","can","be","built","on","all","frameworks","."]
code: def test_ars_compilation(self):
      """Test whether an ARSAlgorithm can be built on all frameworks."""
      config = ARSConfig()
  
      # Keep it simple.
      config.training(
          model={
              "fcnet_hiddens": [10],
              "fcnet_activation": None,
          },
          noise_size=2500000,
      )
      # Test eval workers ("normal" WorkerSet, unlike ARS' list of
      # RolloutWorkers used for collecting train batches).
      config.evaluation(evaluation_interval=1, evaluation_num_workers=1)
  
      num_iterations = 2
  
      for _ in framework_iterator(config):
          algo = config.build(env="CartPole-v1")
          for i in range(num_iterations):
              results = algo.train()
              print(results)
  
          check_compute_single_action(algo)
          algo.stop()
  
file_path: ray/rllib_contrib/ars/tests/test_ars.py
imports: import unittest
  from rllib_ars.ars.ars import ARSConfig
  import ray
  from ray.rllib.utils.test_utils import check_compute_single_action, framework_iterator
label_desc: Use image node_id 3 for calling the TestARS obj's underlying member method code with example usage: obj.test_ars_compilation() without return types