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:
node (
int
) – Node uid for the model node to which GTs are to be uploadedfilepath (
str
) – Path to the CSV file which contains GTs. Local path and MinIO path are supported.label_col (
str
) – Name of the column which contains labels. If labels are strings, user_format must be Trueconversation_id_col (
str
, default:'context_uid'
) – Name of the column containing conversation_ids. Defaults to ‘context_uid’ if using Snorkelflow generated UIDs.utterance_id_col (
str
, default:'utterance_idx'
) – Name of the column containing utterance_ids. Defaults to ‘utterance_idx’.metadata (
Optional
[Dict
[str
,Any
]], default:None
) – Metadata to register as the provenance of ground truth.user_format (
bool
, default:False
) – True if the ground truth labels are strings, False otherwise.
- Return type:
None