DataTableDeserializer: DataTableDeserializer Class

DataTableDeserializerR Documentation

DataTableDeserializer Class

Description

Deserialize CSV or JSON data from an inference endpoint into a data.table.

Super classes

sagemaker.mlcore::BaseDeserializer -> sagemaker.mlcore::SimpleBaseDeserializer -> DataTableDeserializer

Public fields

encoding

string encoding to be used

Methods

Public methods

Inherited methods

Method new()

Initialize a “DataTableDeserializer“ instance.

Usage
DataTableDeserializer$new(
  encoding = "UTF-8",
  accept = c("text/csv", "application/json")
)
Arguments
encoding

(str): The string encoding to use (default: "UTF-8").

accept

(union[str, tuple[str]]): The MIME type (or tuple of allowable MIME types) that is expected from the inference endpoint (default: ("text/csv","application/json")).


Method deserialize()

Deserialize CSV or JSON data from an inference endpoint into a data.table. If the data is JSON, the data should be formatted in the 'columns' orient.

Usage
DataTableDeserializer$deserialize(stream, content_type)
Arguments
stream

(botocore.response.StreamingBody): Data to be deserialized.

content_type

(str): The MIME type of the data.

Returns

data.table: The data deserialized into a data.table.


Method clone()

The objects of this class are cloneable with this method.

Usage
DataTableDeserializer$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

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


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