class_docstr: Tests for the algo TPE.
class_docstr_tok: ["Tests","for","the","algo","TPE","."]
docstr: Test suggest with no shape dimensions
docstr_tok: ["Test","suggest","with","no","shape","dimensions"]
code: def test_suggest_ei_candidates(self, tpe: TPE):
      """Test suggest with no shape dimensions"""
      tpe.n_initial_points = 2
      tpe.n_ei_candidates = 0
  
      results = numpy.random.random(2)
      for i in range(2):
          trials = tpe.suggest(1)
          assert trials is not None
          assert len(trials) == 1
          points = [
              format_trials.trial_to_tuple(trials[0], space=tpe.space)
          ]
          assert len(points[0]) == 3
          assert not isinstance(points[0][0], tuple)
          trials[0] = _add_result(trials[0], results[i])
          tpe.observe(trials)
  
      trials = tpe.suggest(1)
      assert not trials
  
      tpe.n_ei_candidates = 24
      trials = tpe.suggest(1)
      assert trials is not None
      assert len(trials) > 0
  
imports: from __future__ import annotations
  import copy
  import itertools
  import timeit
  from typing import ClassVar
  import numpy
  import numpy
  import pytest
  from scipy.stats import norm
  from orion.algo.space import Categorical, Fidelity, Integer, Real, Space
  from orion.algo.tpe import TPE, CategoricalSampler, GMMSampler, adaptive_parzen_estimator, compute_max_ei_point, ramp_up_weights
  from orion.core.utils import backward, format_trials
  from orion.core.worker.algo_wrappers.space_transform import SpaceTransform
  from orion.core.worker.primary_algo import create_algo
  from orion.core.worker.transformer import build_required_space
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase, first_phase_only
label_desc: Use image node_id 9 for calling the TestTPE_old obj's underlying member method code with example usage: obj.test_suggest_ei_candidates(tpe) without return types