class_docstr: Tests utilities helping with Checkpoint management.
class_docstr_tok: ["Tests","utilities","helping","with","Checkpoint","management","."]
code: def test_get_checkpoint_info_v1_1(self):
      for extension in ["pkl", "msgpck"]:
          # Create a simple (dummy) v1.1 Algorithm checkpoint.
          with tempfile.TemporaryDirectory() as checkpoint_dir:
              # algorithm_state.pkl
              algo_state_file = os.path.join(
                  checkpoint_dir,
                  f"algorithm_state.{extension}",
              )
              Path(algo_state_file).touch()
              # 2 policies
              pol1_dir = os.path.join(
                  checkpoint_dir, "policies", "pol1"
              )
              os.makedirs(pol1_dir)
              pol2_dir = os.path.join(
                  checkpoint_dir, "policies", "pol2"
              )
              os.makedirs(pol2_dir)
              # policy_state.pkl
              Path(os.path.join(pol1_dir, "policy_state.pkl")).touch()
              Path(os.path.join(pol2_dir, "policy_state.pkl")).touch()
  
              info = get_checkpoint_info(checkpoint_dir)
              self.assertTrue(info["type"] == "Algorithm")
              self.assertTrue(str(info["checkpoint_version"]) == "1.1")
              self.assertTrue(info["checkpoint_dir"] == checkpoint_dir)
              self.assertTrue(info["state_file"] == algo_state_file)
              self.assertTrue(
                  "pol1" in info["policy_ids"]
                  and "pol2" in info["policy_ids"]
              )
  
imports: import os
  from pathlib import Path
  import tempfile
  import unittest
  import ray
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig
  from ray.rllib.algorithms.dqn import DQNConfig
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.examples.env.multi_agent import MultiAgentCartPole
  from ray.rllib.policy.policy import Policy
  from ray.rllib.utils.checkpoints import get_checkpoint_info, convert_to_msgpack_checkpoint, convert_to_msgpack_policy_checkpoint
  from ray.rllib.utils.test_utils import check
  from ray import tune
label_desc: Use image node_id 4 for calling the TestCheckpointUtils obj's underlying member method code with example usage: obj.test_get_checkpoint_info_v1_1() without return types