original_docstring: 
          returns generator of all hyperparameters for the given keys
          in the order of precedence
          
docstring: returns generator of all hyperparameters for the given keys
  in the order of precedence
docstring_tokens: returns generator of all hyperparameters for the given keys in the order of precedence
code: def find_hyperparameters(self,
                               hyperparameter_keys,
                               default_value=NoDefaultValue):
          """
          returns generator of all hyperparameters for the given keys
          in the order of precedence
          """
          # use override_hyperparameters
          # ---
          # this has highest precedence
          for hyperparameter_key in hyperparameter_keys:
              if hyperparameter_key in self.override_hyperparameters:
                  yield self.override_hyperparameters[hyperparameter_key]
          # look through hyperparameters of all ancestors
          ancestors = list(self.graph.architecture_ancestors(self._name))
          # prefer closer nodes over more specific queries
          done_ancestors_names = []
          for node in [self._node] + ancestors:
              # append current node to done ancestor
              # ---
              # this is done before the loop, so a node can set_hyperparameter
              # for itself
              done_ancestors_names.append(node.name)
              # prepare set_hyperparameters state
              node_hps = self.node_state[node.name]["set_hyperparameters"]
              for hyperparameter_key in hyperparameter_keys:
                  # try finding set hyperparameters
                  for ancestor_name in done_ancestors_names:
                      try:
                          yield node_hps[ancestor_name][hyperparameter_key]
                      except KeyError:
                          pass
                  # try finding provided hyperparameters
                  try:
                      yield node.get_hyperparameter(self, hyperparameter_key)
                  except MissingHyperparameter:
                      pass
          # try returning the given default value, if any
          if default_value is not NoDefaultValue:
              yield default_value
          # try global default hyperparameters
          # ---
          # this has lowest precedence
          for hyperparameter_key in hyperparameter_keys:
              if hyperparameter_key in self.default_hyperparameters:
                  yield self.default_hyperparameters[hyperparameter_key]
code_tokens: def find_hyperparameters ( self , hyperparameter_keys , default_value = NoDefaultValue ) : for hyperparameter_key in hyperparameter_keys : if hyperparameter_key in self . override_hyperparameters : yield self . override_hyperparameters [ hyperparameter_key ] ancestors = list ( self . graph . architecture_ancestors ( self . _name ) ) done_ancestors_names = [ ] for node in [ self . _node ] + ancestors : done_ancestors_names . append ( node . name ) node_hps = self . node_state [ node . name ] [ "set_hyperparameters" ] for hyperparameter_key in hyperparameter_keys : for ancestor_name in done_ancestors_names : try : yield node_hps [ ancestor_name ] [ hyperparameter_key ] except KeyError : pass try : yield node . get_hyperparameter ( self , hyperparameter_key ) except MissingHyperparameter : pass if default_value is not NoDefaultValue : yield default_value for hyperparameter_key in hyperparameter_keys : if hyperparameter_key in self . default_hyperparameters : yield self . default_hyperparameters [ hyperparameter_key ]
short_docstring: returns generator of all hyperparameters for the given keys
  in the order of precedence
short_docstring_tokens: returns generator of all hyperparameters for the given keys in the order of precedence
comment: """
          returns generator of all hyperparameters for the given keys
          in the order of precedence
          """$SEP$# use override_hyperparameters$SEP$# ---$SEP$# this has highest precedence$SEP$# look through hyperparameters of all ancestors$SEP$# prefer closer nodes over more specific queries$SEP$# append current node to done ancestor$SEP$# ---$SEP$# this is done before the loop, so a node can set_hyperparameter$SEP$# for itself$SEP$# prepare set_hyperparameters state$SEP$# try finding set hyperparameters$SEP$# try finding provided hyperparameters$SEP$# try returning the given default value, if any$SEP$# try global default hyperparameters$SEP$# ---$SEP$# this has lowest precedence