grain.RecordMetadata

grain.RecordMetadata#

class grain.RecordMetadata(index, record_key=None, rng=None)#

RecordMetadata contains metadata about indidivual records.

Metadata can be emitted by the sampler to refer to which record to read next. In addition, they are also used to keep information about records as they flow through the pipeline from one operation to the other.

Parameters:
  • index (int)

  • record_key (int | None)

  • rng (numpy.random.Generator | None)

__init__(index, record_key=None, rng=None)#
Parameters:
  • index (int)

  • record_key (int | None)

  • rng (numpy.random.Generator | None)

Return type:

None

Methods

__init__(index[, record_key, rng])

remove_record_key()

Removes record key if exists.

Attributes

index

record_key

rng