class_docstr: Tests the metric computation related utilities.
class_docstr_tok: ["Tests","the","metric","computation","related","utilities","."]
docstr: Helper function to assert that tensor `t` does not have `nan`, `inf`.
docstr_tok: ["Helper","function","to","assert","that","tensor","`","t","`","does","not","have","`","nan","`",",","`","inf","`","."]
code: def is_valid(self, t, value_name):
      """Helper function to assert that tensor `t` does not have `nan`, `inf`."""
      self.assertFalse(
          jnp.isnan(t).any(), msg=f"Found nan's in {t} for {value_name}"
      )
      self.assertFalse(
          jnp.isinf(t).any(), msg=f"Found inf's in {t} for {value_name}"
      )
  
imports: import itertools
  from absl.testing import absltest
  from absl.testing import parameterized
  from flax.training import common_utils
  import jax
  import jax.numpy
  import numpy
  from scenic.model_lib.base_models import model_utils
label_desc: Use image node_id 1 for calling the MetricTest obj's underlying member method code with example usage: obj.is_valid(t, value_name) without return types