docstr: This tests checks that when the `gen_unlimited_trials` flag is false
  but there are no generation blocking criteria, then the generator run limit
  is set to -1 and a warning is logged.
docstr_tok: ["This","tests","checks","that","when","the","`","gen_unlimited_trials","`","flag","is","false","but","there","are","no","generation","blocking","criteria",",","then","the","generator","run","limit","is","set","to","-1","and","a","warning","is","logged","."]
code: def test_generator_run_limit_unlimited_without_flag(self) -> None:
      """This tests checks that when the `gen_unlimited_trials` flag is false
      but there are no generation blocking criteria, then the generator run limit
      is set to -1 and a warning is logged.
      """
      node = GenerationNode(
          node_name="test",
          model_specs=[
              ModelSpec(
                  model_enum=Models.GPEI,
                  model_kwargs={},
                  model_gen_kwargs={
                      "n": -1,
                      "fixed_features": ObservationFeatures(
                          parameters={"x": 0}
                      ),
                  },
              ),
          ],
          gen_unlimited_trials=False,
      )
      warning_msg = (
          "Even though this node is not flagged for generation of unlimited "
          "trials, there are no generation blocking criterion, therefore, "
          "unlimited trials will be generated."
      )
      with self.assertLogs(
          GenerationNode.__module__, logging.WARNING
      ) as logger:
          self.assertEqual(node.generator_run_limit(), -1)
          self.assertTrue(
              any(warning_msg in output for output in logger.output),
              logger.output,
          )
  
imports: import logging
  from logging import Logger
  from unittest.mock import patch, PropertyMock
  from ax.core.base_trial import TrialStatus
  from ax.core.observation import ObservationFeatures
  from ax.exceptions.core import UserInputError
  from ax.modelbridge.cross_validation import DiagnosticCriterion, MetricAggregation, SingleDiagnosticBestModelSelector
  from ax.modelbridge.factory import get_sobol
  from ax.modelbridge.generation_node import GenerationNode, GenerationStep
  from ax.modelbridge.model_spec import FactoryFunctionModelSpec, ModelSpec
  from ax.modelbridge.registry import Models
  from ax.modelbridge.transition_criterion import MaxTrials
  from ax.utils.common.logger import get_logger
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment
  from ax.utils.testing.mock import fast_botorch_optimize
label_desc: Use image node_id 10 for calling the TestGenerationNode obj's underlying member method code with example usage: obj.test_generator_run_limit_unlimited_without_flag() without return types