snorkelflow.client.nodes.commit_custom_operator
- snorkelflow.client.nodes.commit_custom_operator(node, operator_uid)
Commits a customer operator to the specified node
Parameters
Parameters
Returns
Returns
Dictionary containing the op_version_uid of the newly created op-version
Return type
Return type
Dict[str, Any]
Name Type Default Info node int
The UID of the node to have the op-version committed to. operator_uid int
UID of an existing custom operator, to be turned into an op-version and committed to the node. 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> }