docstr: Makes sure that a given configuration is honored in practice.
  
  This method tests that the set hyperparameters actually create objects
  that comply with the given configuration. It iterates trough the pipeline to
  make sure we did not miss a step, but also checks at the end that every
  configuration from Config was checked
  
  Also considers random_state and ensures pipeline steps correctly recieve
  the right random_state
docstr_tok: ["Makes","sure","that","a","given","configuration","is","honored","in","practice",".","This","method","tests","that","the","set","hyperparameters","actually","create","objects","that","comply","with","the","given","configuration",".","It","iterates","trough","the","pipeline","to","make","sure","we","did","not","miss","a","step",",","but","also","checks","at","the","end","that","every","configuration","from","Config","was","checked","Also","considers","random_state","and","ensures","pipeline","steps","correctly","recieve","the","right","random_state"]
code: def test_set_hyperparameters_honors_configuration(self):
      """Makes sure that a given configuration is honored in practice.
  
      This method tests that the set hyperparameters actually create objects
      that comply with the given configuration. It iterates trough the pipeline to
      make sure we did not miss a step, but also checks at the end that every
      configuration from Config was checked
  
      Also considers random_state and ensures pipeline steps correctly recieve
      the right random_state
      """
  
      all_combinations = list(
          itertools.product([True, False], repeat=4)
      )
      for (
          sparse,
          multilabel,
          signed,
          multiclass,
      ) in all_combinations:
          dataset_properties = {
              "sparse": sparse,
              "multilabel": multilabel,
              "multiclass": multiclass,
              "signed": signed,
          }
          random_state = 1
          auto = SimpleRegressionPipeline(
              random_state=random_state,
              dataset_properties=dataset_properties,
          )
          cs = auto.get_hyperparameter_search_space()
          config = cs.sample_configuration()
  
          # Set hyperparameters takes a given config and translate
          # a config to an actual implementation
          auto.set_hyperparameters(config)
          config_dict = config.get_dictionary()
  
          # keys to check is our mechanism to ensure that every
          # every config key is checked
          keys_checked = []
  
          for name, step in auto.named_steps.items():
              if name == "data_preprocessor":
                  keys_checked.extend(
                      self._test_set_hyperparameter_choice(
                          "data_preprocessor:__choice__",
                          step,
                          config_dict,
                      )
                  )
                  self.assertEqual(step.random_state, random_state)
              elif name == "feature_preprocessor":
                  keys_checked.extend(
                      self._test_set_hyperparameter_choice(
                          "feature_preprocessor:__choice__",
                          step,
                          config_dict,
                      )
                  )
                  self.assertEqual(step.random_state, random_state)
              elif name == "regressor":
                  keys_checked.extend(
                      self._test_set_hyperparameter_choice(
                          "regressor:__choice__", step, config_dict
                      )
                  )
                  self.assertEqual(step.random_state, random_state)
              else:
                  raise ValueError(
                      "Found another type of step! Need to update this check"
                      " {}. ".format(name)
                  )
  
          # Make sure we checked the whole configuration
          self.assertSetEqual(
              set(config_dict.keys()), set(keys_checked)
          )
  
imports: import copy
  import itertools
  import resource
  import tempfile
  import numpy
  import sklearn.datasets
  import sklearn.decomposition
  import sklearn.ensemble
  import sklearn.svm
  from ConfigSpace.configuration_space import ConfigurationSpace
  from ConfigSpace.hyperparameters import CategoricalHyperparameter
  from joblib import Memory
  from sklearn.base import clone
  from sklearn.utils.validation import check_is_fitted
  import autosklearn.pipeline.components.feature_preprocessing
  import autosklearn.pipeline.components.regression
  from autosklearn.pipeline.components.base import AutoSklearnChoice, AutoSklearnComponent, AutoSklearnPreprocessingAlgorithm, AutoSklearnRegressionAlgorithm
  from autosklearn.pipeline.constants import DENSE, PREDICTIONS, SIGNED_DATA, SPARSE, UNSIGNED_DATA
  from autosklearn.pipeline.regression import SimpleRegressionPipeline
  from autosklearn.pipeline.util import get_dataset
  import unittest
  import unittest.mock
  from test.test_pipeline.ignored_warnings import ignore_warnings, regressor_warnings
label_desc: Use image node_id 27 for calling the SimpleRegressionPipelineTest obj's underlying member method code with example usage: obj.test_set_hyperparameters_honors_configuration() without return types