Skip to main content
Version: 25.1

snorkelflow.ingest.import_utterance_ground_truth

snorkelflow.ingest.import_utterance_ground_truth(node, filepath, label_col, conversation_id_col='context_uid', utterance_id_col='utterance_idx', metadata=None, user_format=False)

Uploads ground truth for utterance classification applications. Requires input in the form of [conversation_id, utterance_id, label] triplets.

Parameters

NameTypeDefaultInfo
nodeintNode uid for the model node to which GTs are to be uploaded.
filepathstrPath to the CSV file which contains GTs. Local path and MinIO path are supported.
label_colstrName of the column which contains labels. If labels are strings, user_format must be True.
conversation_id_colstr'context_uid'Name of the column containing conversation_ids. Defaults to ‘context_uid’ if using Snorkelflow generated UIDs.
utterance_id_colstr'utterance_idx'Name of the column containing utterance_ids. Defaults to ‘utterance_idx’.
metadataOptional[Dict[str, Any]]NoneMetadata to register as the provenance of ground truth.
user_formatboolFalseTrue if the ground truth labels are strings, False otherwise.

Return type

None