Class JsonDataSource<T extends Output<T>>

All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<DataSourceProvenance>, Iterable<Example<T>>, ConfigurableDataSource<T>, DataSource<T>

public class JsonDataSource<T extends Output<T>> extends ColumnarDataSource<T>
A DataSource for loading data from a JSON text file and applying FieldProcessors to it.
  • Constructor Details

    • JsonDataSource

      public JsonDataSource(Path dataPath, RowProcessor<T> rowProcessor, boolean outputRequired)
      Creates a JsonDataSource using the specified RowProcessor to process the data.
      Parameters:
      dataPath - The Path to the data file.
      rowProcessor - The row processor which converts a row into an Example.
      outputRequired - Is the output required to exist in the data file.
    • JsonDataSource

      public JsonDataSource(URI dataFile, RowProcessor<T> rowProcessor, boolean outputRequired)
      Creates a JsonDataSource using the specified RowProcessor to process the data.
      Parameters:
      dataFile - A URI for the data file.
      rowProcessor - The row processor which converts a row into an Example.
      outputRequired - Is the output required to exist in the data file.
  • Method Details