Skip to main content
Version: 25.2

snorkelflow.client.models.add_predictions

snorkelflow.client.models.add_predictions(node, *, model_uid, x_uids, predicted_labels=None, predicted_probs=None, user_format=False)

Register predictions generated by models (and optionally, ground truth labels). To learn more about the Label format for your use case you can see Format for ground truth interaction in the SDK.

Parameters

NameTypeDefaultInfo
nodeintUID of the node for which we’re adding predictions.
model_uidintID corresponding to the model that produced predictions.
x_uidsUnion[List[str], ndarray]UIDs of data points for which predictions were made.
predicted_labelsUnion[List[int], ndarray, None]NonePredicted labels corresponding to x_uids.
predicted_probsUnion[List[List[float]], ndarray, None]NonePredicted label probabilities corresponding to x_uids. These probabilities should be a list of lists or 2-D numpy array of dimension (len(x_uids)) x (num_classes). All probabilities must be greater than zero and those for each data point should sum to 1.
user_formatboolFalseTrue if predictions and ground truth are provided in user format, False otherwise.

Return type

None