snorkelflow.client.blocks.duplicate_block
- snorkelflow.client.blocks.duplicate_block(application, from_block_uid, block_config, input_node_uid=-1, assets_to_import=None)
Duplicates a block in an application
Parameters
Parameters
Returns
Returns
Details on the duplicated block
Return type
Return type
Dict[str, any]
Name Type Default Info application Union[str, int]
The name or UID of the application. from_block_uid int
The uid of the block to duplicate. block_config Dict[str, Any]
The block config for the block to be created. input_node_uid int
-1
The input node uid for the newly created block- defaults to the input. assets_to_import Optional[Dict[str, Any]]
None
An optional dictionary specifying duplication options. Example
>>> sf.duplicate_block(
>>> APP_NAME,
>>> BLOCK_UID,
>>> block_config=dict(
>>> label_map=dict(POS=1, NEG=0, UNKNOWN=-1)
>>> ),
>>> )
{
'block_uid': <block_uid>,
'node_uids': [<node_uid>, ...],
'job_ids': [<job_uid>, ...]
}