Class PytorchQAOutputMarshaller<O>

java.lang.Object
org.apache.ignite.example.ml.pytorchtranslator.PytorchQAOutputMarshaller<O>
All Implemented Interfaces:
Serializable, org.apache.ignite.marshalling.ByteArrayMarshaller<O>, org.apache.ignite.marshalling.Marshaller<O,byte[]>

public class PytorchQAOutputMarshaller<O> extends Object implements org.apache.ignite.marshalling.ByteArrayMarshaller<O>, Serializable
Serializes and deserializes PyTorch QA model outputs.

Converts prediction results to and from byte arrays for efficient transport between client and server during inference.

See Also:
  • Constructor Details

    • PytorchQAOutputMarshaller

      public PytorchQAOutputMarshaller()
  • Method Details

    • marshal

      public byte[] marshal(O obj) throws org.apache.ignite.marshalling.MarshallingException
      Specified by:
      marshal in interface org.apache.ignite.marshalling.ByteArrayMarshaller<O>
      Specified by:
      marshal in interface org.apache.ignite.marshalling.Marshaller<O,byte[]>
      Throws:
      org.apache.ignite.marshalling.MarshallingException
    • unmarshal

      public O unmarshal(byte[] data) throws org.apache.ignite.marshalling.UnmarshallingException
      Specified by:
      unmarshal in interface org.apache.ignite.marshalling.ByteArrayMarshaller<O>
      Specified by:
      unmarshal in interface org.apache.ignite.marshalling.Marshaller<O,byte[]>
      Throws:
      org.apache.ignite.marshalling.UnmarshallingException