code: protected void validateHyperParams(P params, Map<String, Object[]> hyperParams) {
      List<SchemaMetadata.FieldMetadata> fsMeta = SchemaMetadata.getFieldMetadata(params);
      for (Map.Entry<String, Object[]> hparam : hyperParams.entrySet()) {
        SchemaMetadata.FieldMetadata fieldMetadata = null;
        // Found corresponding metadata about the field
        for (SchemaMetadata.FieldMetadata fm : fsMeta) {
          if (fm.name.equals(hparam.getKey())) {
            fieldMetadata = fm;
            break;
          }
        }
        if (fieldMetadata == null) {
          throw new H2OIllegalArgumentException(hparam.getKey(), "grid",
                                                "Unknown hyper parameter for grid search!");
        }
        if (!fieldMetadata.is_gridable) {
          throw new H2OIllegalArgumentException(hparam.getKey(), "grid",
                                                "Illegal hyper parameter for grid search! The parameter '"
                                                + fieldMetadata.name + " is not gridable!");
        }
      }
    }
docs: Validate given hyper parameters with respect to type parameter P.
  
  It verifies that given parameters are annotated in P with @API annotation
  
  @param params      regular model build parameters
  @param hyperParams map of hyper parameters