docstr: Test whether MAML can be built with all frameworks.
docstr_tok: ["Test","whether","MAML","can","be","built","with","all","frameworks","."]
code: def test_maml_compilation(self):
      """Test whether MAML can be built with all frameworks."""
      config = MAMLConfig().rollouts(num_rollout_workers=1)
  
      num_iterations = 1
  
      # Test for tf framework (torch not implemented yet).
      for fw in framework_iterator(config, frameworks=("tf", "torch")):
          for env in ["cartpole", "pendulum"]:
              if fw == "tf" and env.startswith("cartpole"):
                  continue
              print("env={}".format(env))
              config.environment(env)
              algo = config.build()
              for i in range(num_iterations):
                  results = algo.train()
                  check_train_results(results)
                  print(results)
              check_compute_single_action(
                  algo, include_prev_action_reward=True
              )
              algo.stop()
  
file_path: ray/rllib_contrib/maml/tests/test_maml.py
imports: import unittest
  from gymnasium.wrappers import TimeLimit
  from rllib_maml.envs.cartpole_mass import CartPoleMassEnv
  from rllib_maml.envs.pendulum_mass import PendulumMassEnv
  from rllib_maml.maml import MAMLConfig
  import ray
  from ray.rllib.utils.test_utils import check_compute_single_action, check_train_results, framework_iterator
  from ray.tune.registry import register_env
label_desc: Use image node_id 3 for calling the TestMAML obj's underlying member method code with example usage: obj.test_maml_compilation() without return types