snorkelflow.client.transfer.export_ground_truth
- snorkelflow.client.transfer.export_ground_truth(node, filepath, is_context=False)
Exports ground truth. Returns a two-column table, where the columns are the
x_uidandlabel. Also writes this table to a CSV file at the provided location.Examples
>>> sf.export_ground_truth(node_uid, gt_filepath)
# returns a pd.DataFrame
x_uid label
0 doc::001 "SPAM"
1 doc::002 "HAM"Parameters
Parameters
Return type
Return type
None if there is no gt, otherwise, a pd.DataFrame with columns x_uid and label.
Name Type Default Info node intID of the node to export GT from. filepath strPath to the ground truth file we export to. This path must be a path in the local filesystem, i.e. cannot be in S3 or MinIO. is_context boolFalseIf True, export a ground truth label for the whole document, if False then just for the span. Only available for information extraction tasks.