morpheus.io.data_storage.in_memory.InMemoryStorage

class InMemoryStorage(file_format)[source]

Bases: morpheus.io.data_storage_interface.RecordStorageInterface

A class to manage storage of data in memory.

Attributes
backing_source

Get the backing source.

num_rows

Get the number of rows in the data.

owner

Get whether this instance is the owner of the data in the buffer.

Methods

delete() Delete the data in the buffer if this instance is the owner.
load() Load data from the buffer.
store(data_source[, copy_from_source]) Store data in the buffer.
property backing_source: str

Get the backing source.

Returns:

The name of the backing source.

delete()[source]

Delete the data in the buffer if this instance is the owner.

load()[source]

Load data from the buffer.

Returns:

The loaded data as a pandas DataFrame.

property num_rows: int

Get the number of rows in the data.

Returns:

The number of rows in the data.

property owner: bool

Get whether this instance is the owner of the data in the buffer.

Returns:

True if this instance is the owner of the data in the buffer, False otherwise.

store(data_source, copy_from_source=True)[source]

Store data in the buffer.

Args:

data_source: The data to store. Can be a pandas.DataFrame, cudf.DataFrame, or a file path. copy_from_source: If True, data_source is assumed to be a file path and the data will be copied from this file to the buffer. If False, the buffer will simply be updated to point to data_source (which is assumed to be a file path).

Previous morpheus.io.data_storage.in_memory
Next morpheus.io.data_storage_interface
© Copyright 2024, NVIDIA. Last updated on Apr 25, 2024.