@Test public void testBaseValidationOK() { final DatasetSchema schema = TestDatasetSchemaBuilder.builder() .withCategoricalFields(3) .withNumericalFields(3) .withStringFields(3) .build(); assertThat(ValidationUtils.baseLoadValidations(schema, ImmutableMap.of("param1", "val1"))) .as("The result of validating a valid schema and params map") .isEmpty(); }
public static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params) { final ImmutableList.Builder<ParamValidationError> errorBuilder = ImmutableList.builder(); if (Objects.isNull(schema)) { errorBuilder.add(new ParamValidationError("DatasetSchema cannot be null")); } if (Objects.isNull(params)) { errorBuilder.add(new ParamValidationError("The map of parameters cannot be null")); } return errorBuilder.build(); }
ValidationUtils { public static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params) { final ImmutableList.Builder<ParamValidationError> errorBuilder = ImmutableList.builder(); if (Objects.isNull(schema)) { errorBuilder.add(new ParamValidationError("DatasetSchema cannot be null")); } if (Objects.isNull(params)) { errorBuilder.add(new ParamValidationError("The map of parameters cannot be null")); } return errorBuilder.build(); } }
ValidationUtils { public static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params) { final ImmutableList.Builder<ParamValidationError> errorBuilder = ImmutableList.builder(); if (Objects.isNull(schema)) { errorBuilder.add(new ParamValidationError("DatasetSchema cannot be null")); } if (Objects.isNull(params)) { errorBuilder.add(new ParamValidationError("The map of parameters cannot be null")); } return errorBuilder.build(); } private  ValidationUtils(); }
ValidationUtils { public static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params) { final ImmutableList.Builder<ParamValidationError> errorBuilder = ImmutableList.builder(); if (Objects.isNull(schema)) { errorBuilder.add(new ParamValidationError("DatasetSchema cannot be null")); } if (Objects.isNull(params)) { errorBuilder.add(new ParamValidationError("The map of parameters cannot be null")); } return errorBuilder.build(); } private  ValidationUtils(); static List<ParamValidationError> checkParams(final MLAlgorithmDescriptor algorithmDescriptor, final Map<String, String> params); static Optional<ParamValidationError> validateCategoricalSchema(final DatasetSchema schema); static List<ParamValidationError> validateModelInDir(final Path modelPath); static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params); static List<ParamValidationError> checkNoFieldsOfType(final DatasetSchema schema,
                                                                 final Class<? extends AbstractValueSchema> fieldClass); static List<ParamValidationError> validateModelPathToTrain(final Path pathToPersist); }
ValidationUtils { public static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params) { final ImmutableList.Builder<ParamValidationError> errorBuilder = ImmutableList.builder(); if (Objects.isNull(schema)) { errorBuilder.add(new ParamValidationError("DatasetSchema cannot be null")); } if (Objects.isNull(params)) { errorBuilder.add(new ParamValidationError("The map of parameters cannot be null")); } return errorBuilder.build(); } private  ValidationUtils(); static List<ParamValidationError> checkParams(final MLAlgorithmDescriptor algorithmDescriptor, final Map<String, String> params); static Optional<ParamValidationError> validateCategoricalSchema(final DatasetSchema schema); static List<ParamValidationError> validateModelInDir(final Path modelPath); static List<ParamValidationError> baseLoadValidations(final DatasetSchema schema, final Map<String, String> params); static List<ParamValidationError> checkNoFieldsOfType(final DatasetSchema schema,
                                                                 final Class<? extends AbstractValueSchema> fieldClass); static List<ParamValidationError> validateModelPathToTrain(final Path pathToPersist);  }