class_docstr: Test suite for algorithm DEHB
class_docstr_tok: ["Test","suite","for","algorithm","DEHB"]
docstr: Fails because of https://github.com/Epistimio/orion/issues/598
docstr_tok: ["Fails","because","of","https",":","\/\/github.com\/Epistimio\/orion\/issues\/598"]
code: def test_is_done_cardinality(self):
      """Fails because of https://github.com/Epistimio/orion/issues/598"""
      space_config = self.update_space(
          {
              "x": "uniform(0, 4, discrete=True)",
              "y": "choices(['a', 'b', 'c'])",
              "z": "loguniform(1, 6, discrete=True)",
          }
      )
      space = self.create_space(space_config)
      assert space.cardinality == 5 * 3 * 6
  
      algo = self.create_algo(space=space)
      i = 0
      for i, (x, y, z) in enumerate(
          itertools.product(range(5), "abc", range(1, 7))
      ):
          assert not algo.is_done
          n = algo.n_suggested
          backward.algo_observe(
              algo,
              [format_trials.tuple_to_trial([1, x, y, z], space)],
              [dict(objective=i)],
          )
          assert algo.n_suggested == n + 1
  
      assert i + 1 == space.cardinality
  
      assert algo.is_done
  
file_path: orion/tests/unittests/algo/test_dehb.py
imports: import itertools
  from typing import ClassVar
  import numpy
  import pytest
  from orion.algo.dehb.dehb import UnsupportedConfiguration, import_optional
  from orion.core.utils import backward, format_trials
  from orion.testing.algo import BaseAlgoTests, TestPhase, last_phase_only
label_desc: Use image node_id 6 for calling the TestDEHB obj's underlying member method code with example usage: obj.test_is_done_cardinality() without return types