Attempt to produce a Spec.
Attempt to produce a Spec.
semantics used to make sense of the features in the JsonSpec
a JSON specification to transform into a RowCreator.
Name of this producer.
Attempt to parse the JSON AST to an intermediate representation that is used
RowCreatorProducer is used to create different kinds of RowCreator instances.
Classes that extend RowCreatorProducer should (try to) have only zero-argument constructors.
This is because RowCreator instances should ideally only be parametrized by the JSON specification. Otherwise, one JSON specification could produce non-equivalent RowCreator instances in different environments.
This statelessness is a design goal and should only be broken with good reason.
One of the reasons this rule will likely be broken is that things like context bounds on a type parameter to a RowCreatorProducer become constructor arguments. So if a RowCreatorProducer is parametrized by a type that requires a type class to decode the JSON representation, this rule would be broken.
Another example might be in training multi-label models. Whereas in binary classifiers the labels values are known automatically (because they are isomorphic to the set
{true, false}
), the label set isn't known a priori (because each problem codomain might be different). Therefore, we might ask for the set of labels to expect.NOTE:
com.eharmony.aloha.dataset.RowCreatorProducerTest
will be used to control which RowCreatorProducers can accept parameters.type of input passed to the RowCreator.
type of output returned from the RowCreator.
implementation of the RowCreator that is returned by the
getRowCreator
function.