SingleRecordStrategy: Feed a single record at a time for batch inference.

SingleRecordStrategyR Documentation

Feed a single record at a time for batch inference.

Description

If a single record does not fit within the payload specified it will throw a RuntimeError.

Super class

sagemaker.core::BatchStrategy -> SingleRecordStrategy

Methods

Public methods

Inherited methods

Method pad()

Group together as many records as possible to fit in the specified size. This SingleRecordStrategy will not group any record and will return them one by one as long as they are within the maximum size.

Usage
SingleRecordStrategy$pad(file, size = 6)
Arguments
file

(str): file path to read the records from.

size

(int): maximum size in MB that each group of records will be fitted to. passing 0 means unlimited size.

Returns

generator of records


Method clone()

The objects of this class are cloneable with this method.

Usage
SingleRecordStrategy$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-local documentation built on June 14, 2022, 10:32 p.m.