class_docstr: Helper class to compare architecturally identical Models across frameworks.
  
  Holds a ModelConfig, such that individual models can be added simply via their
  framework string (by building them with config.build(framework=...).
  A call to `check()` forces all added models to be compared in terms of their
  number of trainable and non-trainable parameters, as well as, their
  computation results given a common weights structure and values and identical
  inputs to the models.
class_docstr_tok: ["Helper","class","to","compare","architecturally","identical","Models","across","frameworks",".","Holds","a","ModelConfig",",","such","that","individual","models","can","be","added","simply","via","their","framework","string","(","by","building","them","with","config.build","(","framework=","...",")",".","A","call","to","`","check","(",")","`","forces","all","added","models","to","be","compared","in","terms","of","their","number","of","trainable","and","non-trainable","parameters",",","as","well","as",",","their","computation","results","given","a","common","weights","structure","and","values","and","identical","inputs","to","the","models","."]
docstr: Compares all added Models with each other and possibly raises errors.
code: def check(self):
      """Compares all added Models with each other and possibly raises errors."""
  
      main_key = next(iter(self.models.keys()))
      # Compare number of trainable and non-trainable params between all
      # frameworks.
      for c in self.param_counts.values():
          check(c, self.param_counts[main_key])
  
      # Compare dummy outputs by exact values given that all nets received the
      # same input and all nets have the same (dummy) weight values.
      for v in self.output_values.values():
          check(v, self.output_values[main_key], atol=0.0005)
  
imports: from collections import Counter
  import copy
  import gymnasium
  from gymnasium.spaces import Box, Discrete, MultiDiscrete, MultiBinary
  from gymnasium.spaces import Dict
  from gymnasium.spaces import Tuple
  import inspect
  import logging
  import numpy
  import os
  import pprint
  import random
  import re
  import time
  import tree
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Type, Union
  import yaml
  import ray
  from ray import air, tune
  from ray.rllib.env.wrappers.atari_wrappers import is_atari, wrap_deepmind
  from ray.rllib.utils.framework import try_import_jax, try_import_tf, try_import_torch
  from ray.rllib.utils.metrics import DIFF_NUM_GRAD_UPDATES_VS_SAMPLER_POLICY, NUM_ENV_STEPS_SAMPLED, NUM_ENV_STEPS_TRAINED
  from ray.rllib.utils.nested_dict import NestedDict
  from ray.rllib.utils.typing import ResultDict
  from ray.rllib.utils.error import UnsupportedSpaceException
  from ray.tune import CLIReporter, run_experiments
label_desc: Use image node_id 3 for calling the ModelChecker obj's underlying member method code with example usage: obj.check() without return types