emmi.pipeline.sample_processors.duplicate_keys

Classes

DuplicateKeysSampleProcessor

Utility processor that simply duplicates the dictionary keys in a batch.

Module Contents

class emmi.pipeline.sample_processors.duplicate_keys.DuplicateKeysSampleProcessor(key_map)

Bases: ksuit.data.SampleProcessor

Utility processor that simply duplicates the dictionary keys in a batch.

Parameters:

key_map (dict[str, str]) – Dict with source keys as keys and target keys as values. The source keys are duplicated in the samples and the target keys are created. The values of the source keys are used for the target keys.

key_map