SimpleBaseSerializer: Abstract base class for creation of new serializers.

SimpleBaseSerializerR Documentation

Abstract base class for creation of new serializers.

Description

This class extends the API of BaseSerializer with more user-friendly options for setting the Content-Type header, in situations where it can be provided at init and freely updated.

Super class

sagemaker.mlcore::BaseSerializer -> SimpleBaseSerializer

Public fields

content_type

The data MIME type

Active bindings

CONTENT_TYPE

The data MIME type set in the Content-Type header on prediction endpoint requests.

Methods

Public methods

Inherited methods

Method new()

Initialize a SimpleBaseSerializer instance.

Usage
SimpleBaseSerializer$new(content_type = "application/json")
Arguments
content_type

(str): The MIME type to signal to the inference endpoint when sending request data (default: "application/json").


Method serialize()

Take data of various data formats and serialize them into CSV.

Usage
SimpleBaseSerializer$serialize(data)
Arguments
data

(object): Data to be serialized


Method clone()

The objects of this class are cloneable with this method.

Usage
SimpleBaseSerializer$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other serializer: BaseDeserializer, BaseSerializer, BytesDeserializer, CSVDeserializer, CSVSerializer, DataTableDeserializer, IdentitySerializer, JSONDeserializer, JSONLinesDeserializer, JSONLinesSerializer, JSONSerializer, LibSVMSerializer, NumpyDeserializer, NumpySerializer, SimpleBaseDeserializer, SparseMatrixSerializer, StringDeserializer, TibbleDeserializer


DyfanJones/sagemaker-r-mlcore documentation built on May 3, 2022, 10:08 a.m.