Skip to main content
Version: 0.93

snorkelflow.client.nodes.commit_custom_operator

snorkelflow.client.nodes.commit_custom_operator(node, operator_uid)

Commits a customer operator to the specified node

Parameters

NameTypeDefaultInfo
nodeintThe UID of the node to have the op-version committed to.
operator_uidintUID of an existing custom operator, to be turned into an op-version and committed to the node.

Returns

Dictionary containing the op_version_uid of the newly created op-version

Return type

Dict[str, Any]

Examples

>>> # Add a custom operator
>>> operator_uid = sf.add_operator(operator)["op_uid"]
>>> # Add a placeholder node
>>> add_node_resp = sf.add_node(
>>> application=APP_NAME,
>>> input_node_uids=[INPUT_NODE_ID],
>>> expected_op_type="Featurizer",
>>> output_node_uid=model_node_uid,
>>> )
>>> sf.commit_custom_operator_to_node(
>>> node=add_node_resp['node_uid'],
>>> operator_uid=operator_uid,
>>> )
{'op_version_uid': <op_version_uid> }