docstr: Separate :attr:`space` into subspaces based on :attr:`model_params` keys
  
  Returns
  -------
  Dict[str, Space]
      Dict of subspaces, wherein keys are all keys of :attr:`model_params`. Each key's
      corresponding value is a filtered subspace, containing all the dimensions in
      :attr:`space` whose name tuples start with that key. Keys will usually be one of the
      core hyperparameter group names ("model_init_params", "model_extra_params",
      "feature_engineer", "feature_selector")
  
  Examples
  --------
  >>> from hyperparameter_hunter import Integer
  >>> def es_0(all_inputs):
  ...     return all_inputs
  >>> def es_1(all_inputs):
  ...     return all_inputs
  >>> def es_2(all_inputs):
  ...     return all_inputs
  >>> s = Space([
  ...     Integer(900, 1500, name=("model_init_params", "max_iter")),
  ...     Categorical(["svd", "cholesky", "lsgr"], name=("model_init_params", "solver")),
  ...     Categorical([es_1, es_2], name=("feature_engineer", "steps", 1)),
  ... ])
  >>> rf = ResultFinder(
  ...     "a", "b", "c", ("oof", "d"), space=s, leaderboard_path="e", descriptions_dir="f",
  ...     model_params=dict(
  ...         model_init_params=dict(
  ...             max_iter=s.dimensions[0], normalize=True, solver=s.dimensions[1],
  ...         ),
  ...         feature_engineer=FeatureEngineer([es_0, s.dimensions[2]]),
  ...     ),
  ... )
  >>> rf.mini_spaces  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
  {'model_init_params': Space([Integer(low=900, high=1500),
                               Categorical(categories=('svd', 'cholesky', 'lsgr'))]),
   'feature_engineer': Space([Categorical(categories=(<function es_1 at ...>,
                                                      <function es_2 at ...>))])}
docstr_tok: ["Separate",":","attr",":","`","space","`","into","subspaces","based","on",":","attr",":","`","model_params","`","keys","Returns","--","--","--","-","Dict","[","str",",","Space","]","Dict","of","subspaces",",","wherein","keys","are","all","keys","of",":","attr",":","`","model_params","`",".","Each","key's","corresponding","value","is","a","filtered","subspace",",","containing","all","the","dimensions","in",":","attr",":","`","space","`","whose","name","tuples","start","with","that","key",".","Keys","will","usually","be","one","of","the","core","hyperparameter","group","names","(","``","model_init_params","''",",","``","model_extra_params","''",",","``","feature_engineer","''",",","``","feature_selector","''",")","Examples","--","--","--","--",">",">",">","from","hyperparameter_hunter","import","Integer",">",">",">","def","es_0","(","all_inputs",")",":","...","return","all_inputs",">",">",">","def","es_1","(","all_inputs",")",":","...","return","all_inputs",">",">",">","def","es_2","(","all_inputs",")",":","...","return","all_inputs",">",">",">","s","=","Space","(","[","...","Integer","(","900",",","1500",",","name=","(","``","model_init_params","''",",","``","max_iter","''",")",")",",","...","Categorical","(","[","``","svd","''",",","``","cholesky","''",",","``","lsgr","''","]",",","name=","(","``","model_init_params","''",",","``","solver","''",")",")",",","...","Categorical","(","[","es_1",",","es_2","]",",","name=","(","``","feature_engineer","''",",","``","steps","''",",","1",")",")",",","...","]",")",">",">",">","rf","=","ResultFinder","(","...","``","a","''",",","``","b","''",",","``","c","''",",","(","``","oof","''",",","``","d","''",")",",","space=s",",","leaderboard_path=","''","e","''",",","descriptions_dir=","''","f","''",",","...","model_params=dict","(","...","model_init_params=dict","(","...","max_iter=s.dimensions","[","0","]",",","normalize=True",",","solver=s.dimensions","[","1","]",",","...",")",",","...","feature_engineer=FeatureEngineer","(","[","es_0",",","s.dimensions","[","2","]","]",")",",","...",")",",","...",")",">",">",">","rf.mini_spaces","#","doctest",":","+ELLIPSIS","+NORMALIZE_WHITESPACE","{","'model_init_params","'",":","Space","(","[","Integer","(","low=900",",","high=1500",")",",","Categorical","(","categories=","(","'svd","'",",","'cholesky","'",",","'lsgr","'",")",")","]",")",",","'feature_engineer","'",":","Space","(","[","Categorical","(","categories=","(","<","function","es_1","at","...",">",",","<","function","es_2","at","...",">",")",")","]",")","}"]
code: def mini_spaces(self) -> Dict[str, Space]:
      """Separate :attr:`space` into subspaces based on :attr:`model_params` keys
  
      Returns
      -------
      Dict[str, Space]
          Dict of subspaces, wherein keys are all keys of :attr:`model_params`. Each key's
          corresponding value is a filtered subspace, containing all the dimensions in
          :attr:`space` whose name tuples start with that key. Keys will usually be one of the
          core hyperparameter group names ("model_init_params", "model_extra_params",
          "feature_engineer", "feature_selector")
  
      Examples
      --------
      >>> from hyperparameter_hunter import Integer
      >>> def es_0(all_inputs):
      ...     return all_inputs
      >>> def es_1(all_inputs):
      ...     return all_inputs
      >>> def es_2(all_inputs):
      ...     return all_inputs
      >>> s = Space([
      ...     Integer(900, 1500, name=("model_init_params", "max_iter")),
      ...     Categorical(["svd", "cholesky", "lsgr"], name=("model_init_params", "solver")),
      ...     Categorical([es_1, es_2], name=("feature_engineer", "steps", 1)),
      ... ])
      >>> rf = ResultFinder(
      ...     "a", "b", "c", ("oof", "d"), space=s, leaderboard_path="e", descriptions_dir="f",
      ...     model_params=dict(
      ...         model_init_params=dict(
      ...             max_iter=s.dimensions[0], normalize=True, solver=s.dimensions[1],
      ...         ),
      ...         feature_engineer=FeatureEngineer([es_0, s.dimensions[2]]),
      ...     ),
      ... )
      >>> rf.mini_spaces  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
      {'model_init_params': Space([Integer(low=900, high=1500),
                                   Categorical(categories=('svd', 'cholesky', 'lsgr'))]),
       'feature_engineer': Space([Categorical(categories=(<function es_1 at ...>,
                                                          <function es_2 at ...>))])}
      """
      if self._mini_spaces is None:
          self._mini_spaces = {}
  
          # Need to use `space.names` and `get_by_name` because the `location` attribute should
          #   be preferred to `name` if it exists, which is the case for Keras
          names = self.space.names()
  
          for param_group_name in self.model_params.keys():
              # Use `space.get_by_name` to respect `location` (see comment above)
              self._mini_spaces[param_group_name] = Space(
                  [
                      self.space.get_by_name(n)
                      for n in names
                      if n[0] == param_group_name
                  ]
              )
  
      return self._mini_spaces
  
imports: from hyperparameter_hunter.feature_engineering import EngineerStep, FeatureEngineer
  from hyperparameter_hunter.i_o.exceptions import IncompatibleCandidateError
  from hyperparameter_hunter.compat.keras_helper import keras_callback_to_dict, keras_initializer_to_dict
  from hyperparameter_hunter.settings import G
  from hyperparameter_hunter.space.dimensions import Categorical, RejectedOptional
  from hyperparameter_hunter.space.space_core import Space
  from hyperparameter_hunter.utils.boltons_utils import remap, get_path
  from hyperparameter_hunter.utils.general_utils import multi_visit
  from hyperparameter_hunter.utils.optimization_utils import does_fit_in_space, get_ids_by, get_scored_params
  from copy import deepcopy
  from numbers import Number
  from pathlib import Path
  from typing import Dict, List, Tuple, Union
  import wrapt
label_desc: Use image node_id 3 for calling the ResultFinder obj's underlying member method code with example usage: obj.mini_spaces() and returns: self