Interface ProtoSerializable<T extends com.google.protobuf.Message>

Type Parameters:
T - The protobuf type.
All Known Subinterfaces:
Classifiable<T>, Distance, EnsembleCombiner<T>, ExampleTransformer, FeatureConverter, FeedForwardParameters, ImmutableOutputInfo<T>, Kernel, LabelFeatureExtractor, Matrix, Merger, MutableOutputInfo<T>, NeighboursQueryFactory, OCIOutputConverter<T>, Output<T>, OutputConverter<T>, OutputFactory<T>, OutputInfo<T>, OutputTransformer<T>, Parameters, SequenceFeatureConverter, SequenceOutputConverter<T>, SGDVector, Tensor, Transformer, VariableIDInfo, VariableInfo, VectorNormalizer, XGBoostOutputConverter<T>
All Known Implementing Classes:
AbstractFMModel, AbstractLinearSGDModel, AbstractSGDModel, AnomalyFactory, AnomalyInfo, ArrayExample, AveragingCombiner, BinaryFeaturesExample, BinningTransformation.BinningTransformer, CategoricalIDInfo, CategoricalInfo, ClassifierChainModel, ClusterID, ClusteringFactory, ClusteringInfo, ConfidencePredictingSequenceModel, CosineDistance, CRFModel, CRFParameters, Dataset, DatasetView, DefaultFeatureExtractor, DenseFeatureConverter, DenseMatrix, DenseSparseMatrix, DenseTransformer, DenseVector, DummyClassifierModel, DummyRegressionModel, EnsembleModel, Event, Example, ExpNormalizer, ExternalModel, FeatureMap, FMClassificationModel, FMMultiLabelModel, FMParameters, FMRegressionModel, FullyWeightedVotingCombiner, HashCodeHasher, HashedFeatureMap, Hasher, HdbscanModel, HeapMerger, ImageConverter, ImageTransformer, ImmutableAnomalyInfo, ImmutableClusteringInfo, ImmutableDataset, ImmutableFeatureMap, ImmutableLabelInfo, ImmutableMultiLabelInfo, ImmutableRegressionInfo, ImmutableSequenceDataset, IndependentMultiLabelModel, IndependentRegressionTreeModel, IndependentSequenceModel, IndexedArrayExample, KDTreeFactory, KernelSVMModel, KMeansModel, KNNModel, L1Distance, L2Distance, Label, LabelConverter, LabelFactory, LabelInfo, LabelOneVOneTransformer, LabelTransformer, LibLinearAnomalyModel, LibLinearClassificationModel, LibLinearModel, LibLinearRegressionModel, LibSVMAnomalyModel, LibSVMClassificationModel, LibSVMModel, LibSVMRegressionModel, Linear, LinearParameters, LinearSGDModel, LinearSGDModel, LinearSGDModel, ListExample, MatrixHeapMerger, MessageDigestHasher, MinimumCardinalityDataset, MinimumCardinalitySequenceDataset, Model, ModHashCodeHasher, MultiLabel, MultiLabelConverter, MultiLabelFactory, MultiLabelInfo, MultiLabelTransformer, MultiLabelVotingCombiner, MultinomialNaiveBayesModel, MutableAnomalyInfo, MutableClusteringInfo, MutableDataset, MutableFeatureMap, MutableLabelInfo, MutableMultiLabelInfo, MutableRegressionInfo, MutableSequenceDataset, NeighboursBruteForceFactory, NoopFeatureExtractor, NoopNormalizer, Normalizer, OCILabelConverter, OCIModel, OCIMultiLabelConverter, OCIRegressorConverter, ONNXExternalModel, Polynomial, Prediction, RBF, RealIDInfo, RealInfo, RegressionFactory, RegressionInfo, Regressor, Regressor.DimensionTuple, RegressorConverter, RegressorTransformer, SelectedFeatureDataset, SelectedFeatureSet, SequenceDataset, SequenceExample, SequenceModel, ShrinkingMatrix, ShrinkingVector, Sigmoid, SigmoidNormalizer, SimpleTransform, SkeletalIndependentRegressionModel, SkeletalIndependentRegressionSparseModel, SkeletalVariableInfo, SparseLinearModel, SparseModel, SparseVector, TensorFlowCheckpointModel, TensorFlowFrozenExternalModel, TensorFlowModel, TensorFlowNativeModel, TensorFlowSavedModelExternalModel, TensorFlowSequenceModel, TransformedModel, TransformerMap, TreeModel, ViterbiModel, VotingCombiner, WeightedEnsembleModel, XGBoostClassificationConverter, XGBoostExternalModel, XGBoostModel, XGBoostRegressionConverter

public interface ProtoSerializable<T extends com.google.protobuf.Message>
Interface for serializing an implementing object to the specified protobuf.

All classes which implement this interface must expose a static method called DESERIALIZATION_METHOD_NAME which accepts three arguments (int version, String className, com.google.protobuf.Any message) and returns an instance of this class. We can't require this with the type system yet, so it must be checked by tests.

The deserialization factory is accessed reflectively, and so if it is not public the module must be opened to the org.tribuo.core module.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the static deserialization method for ProtoSerializable classes.
    static final com.oracle.labs.mlrg.olcut.config.protobuf.ProtoProvenanceSerialization
    Serializer used for provenance objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    Serializes this object to a protobuf.
  • Field Details

    • PROVENANCE_SERIALIZER

      static final com.oracle.labs.mlrg.olcut.config.protobuf.ProtoProvenanceSerialization PROVENANCE_SERIALIZER
      Serializer used for provenance objects.
    • DESERIALIZATION_METHOD_NAME

      static final String DESERIALIZATION_METHOD_NAME
      The name of the static deserialization method for ProtoSerializable classes.
      See Also:
  • Method Details

    • serialize

      T serialize()
      Serializes this object to a protobuf.
      Returns:
      The protobuf.