snorkelflow.client.applications.create_classification_application
- snorkelflow.client.applications.create_classification_application(application_name, dataset, input_schema, labels, label_col=None)
Create an application with a classification block.
- Parameters:
application_name (
str
) – The name of the new applicationdataset (
Union
[str
,int
]) – The name or UID of the dataset which the application will useinput_schema (
List
[str
]) – A list of columns (from the dataset)labels (
List
[str
]) – A string list of labels for the tasklabel_col (
Optional
[str
], default:None
) – An optional string name of a dataset column that contains labels
- Returns:
The created application object
- Return type:
Dict[str, Any]
Examples
>>> sf.create_classification_application(
>>> APP_NAME,
>>> dataset=DATASET_NAME,
>>> input_schema=["field1", "field2"],
>>> labels=["label1", "label2"],
>>> label_col="label",
>>> )
{
'application_uid': <application_uid>,
'name': <name>,
'dataset_uid': <dataset_uid>,
'description': <description>,
'application_config': <application_config_dict>, # Contains input schema
'created_at': <timetamp>,
'node_dag': <node_dag>, # contains list of nodes and it's input node
'access_config': <access_config>,
'hydrated_node_dag': <hydrated_node_dag> # Contains list of it's node and it's config
}