Skip to main content

label_binarize

Text Preprocessing standalone SDK operation. Source: 4.3.1.1.ML.Preprocessing.Text.cs. Read the complete C# integration test and setup.

2 recorded job(s); 2 have a success/completed status and a saved result. These are API records rather than independently verified test passes.

Recorded scenarios​

Recorded scenarioPartitionLast statusEvidenceJSON trace
Fetch20Newsgroups / TrainTestSplit / SimpleImputer / label_binarizetestcompletedResult recordedrun-1096
Fetch20Newsgroups / TrainTestSplit / SimpleImputer / label_binarizetraincompletedResult recordedrun-1097

Representative execution​

Scenario: Fetch20Newsgroups / TrainTestSplit / SimpleImputer / label_binarize; partition: test; observed status: completed. run-1096 contains all recorded numbered JSON events for this job.

Operation selection in the C# test​

These are matching lines from the parameterized test, not a separate runnable program. See the full source for context.

private static readonly string[] Algorithms = { "label_binarize" };
bool classification = name == "label_binarize";
Assert.Skip("label_binarize requires at least two training target classes.");
case "label_binarize":
PreprocessorType = "label_binarize",

Request​

{
"input": {
"input_blob_id": "115f9f20-4041-e7bd-3c5f-3d9558446b17",
"preprocessor_type": "label_binarize",
"preprocessor_params": {
"classes": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
]
},
"feature_columns": [],
"file_format": "csv",
"target_column": "target",
"keep_other_columns": true,
"generate_graphs": false
},
"output": {
"name": "preprocessing-label_binarize-imputed.zip",
"description": "Preprocessing label_binarize on Impute artifact imputed.csv",
"record_type": "Generic",
"access_tier": "Hot",
"tags": [
"preprocessing",
"impute",
"integration-tests",
"label_binarize"
]
},
"request_timeout_seconds": 300
}

Send response​

{
"start_time": "2026-11-29T13:23:22.7905582+00:00",
"end_time": "2026-11-29T13:23:22.8516223+00:00",
"elapsed_milliseconds": 61.06,
"status": "published",
"job_id": "24a2529d-095c-e46d-e464-c214b302f231",
"topic": "pm.topic.ml.preprocessing",
"subscription": "cpu.0p5c.1gi",
"send_request_model": {
"job_id": "24a2529d-095c-e46d-e464-c214b302f231",
"json": {
"job_id": "24a2529d-095c-e46d-e464-c214b302f231",
"model_id": "0092e982-80d0-a014-f4e5-efd5ad4b95a8",
"input": {
"input_blob_id": "115f9f20-4041-e7bd-3c5f-3d9558446b17",
"input_encryption_key": "[REDACTED]",
"preprocessor_type": "label_binarize",
"preprocessor_params": {
"classes": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
]
},
"feature_columns": [],
"file_format": "csv"
},
"request_timeout_seconds": 300,
"output": {
"name": "preprocessing-label_binarize-imputed.zip",
"description": "Preprocessing label_binarize on Impute artifact imputed.csv",
"record_type": "Generic",
"access_tier": "Hot",
"tags": [
"preprocessing",
"impute",
"integration-tests",
"label_binarize"
],
"encryption_key": "[REDACTED]"
},
"target_column": "target",
"keep_other_columns": true,
"generate_graphs": false
},
"topic": "pm.topic.ml.preprocessing",
"subscription": "cpu.0p5c.1gi"
}
}

Final recorded status​

{
"start_time": "2026-11-29T13:24:23.1561699+00:00",
"end_time": "2026-11-29T13:24:23.8893101+00:00",
"elapsed_milliseconds": 733.13,
"job_id": "24a2529d-095c-e46d-e464-c214b302f231",
"status": "completed",
"topic": "pm.topic.ml.preprocessing",
"subscription": "cpu.0p5c.1gi",
"dead_letter_reason": null,
"dead_letter_error_description": null
}

Result response​

{
"jobId": "24a2529d-095c-e46d-e464-c214b302f231",
"execution": {
"executionName": "[REDACTED]",
"jobName": "[REDACTED]",
"container": {
"hostname": "[REDACTED]",
"replicaName": "[REDACTED]",
"processId": 1
}
},
"preprocessor_type": "label_binarize",
"operation_kind": "function",
"stats": {
"row_count": 2829,
"column_count": 4,
"feature_count": 1,
"training_row_count": 2829,
"test_row_count": 0,
"output_feature_count": 20,
"output_column_count": 23,
"feature_columns": [],
"output_feature_columns": [
"target__0",
"target__1",
"target__2",
"target__3",
"target__4",
"target__5",
"target__6",
"target__7",
"target__8",
"target__9",
"target__10",
"target__11",
"target__12",
"target__13",
"target__14",
"target__15",
"target__16",
"target__17",
"target__18",
"target__19"
],
"retained_columns": [
"row_index",
"partition",
"text"
],
"target_column": "target",
"file_format": "csv",
"task_type": "preprocessing",
"sparse_output": false,
"cross_fitted_training": false
},
"effective_params": {
"neg_label": 0,
"pos_label": 1,
"sparse_output": false,
"classes": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
]
},
"learned": {},
"warnings": [],
"runtime": {
"captured_at_utc": "2026-11-29T13:23:59.511636+00:00",
"python": {
"version": "3.12.16",
"implementation": "CPython"
},
"packages": {
"scikit-learn": "1.9.1",
"numpy": "2.5.4",
"pandas": "3.0.6",
"scipy": "1.18.1",
"pydantic": "2.14.1",
"joblib": "1.6.0",
"matplotlib": "3.11.2",
"azure-servicebus": "7.14.3",
"parallelmodel": "1.0.0"
},
"environment": {
"os": "Linux",
"os_release": "6.6.159.1-2.azl3",
"architecture": "x86_64",
"region": "uk1"
}
},
"artifact_format": "zip",
"artifact_archive": "preprocessing-output.zip",
"artifact_files": [
"model.joblib",
"transformed.csv",
"partitions.csv",
"result.json"
]
}

First extract response​

{
"start_time": "2026-11-29T13:24:26.8772107+00:00",
"end_time": "2026-11-29T13:24:28.0550744+00:00",
"elapsed_milliseconds": 1177.85,
"status": "uploaded",
"model_id": "0092e982-80d0-a014-f4e5-efd5ad4b95a8",
"source_blob_id": "a0de5b79-47f2-5ce5-8807-cae84d1bea69",
"uploaded_blob_id": "b8221a23-a346-3312-90e5-e97de7d53a4a",
"filename": "234d6466-3169-ad1a-94e3-5485e1c5ef80.joblib",
"source_path": "model.joblib",
"source_format": "joblib",
"size_bytes": 612,
"upload_status_code": 200
}

Logs​

The trace includes the saved log response (38 entries).

Reproduce the operation​

dotnet test --filter "FullyQualifiedName~ParallelModel.Sdk.UnitTests.PreprocessingText.Run"

The filter runs the class theory; use the recorded scenario values above to identify the corresponding parameter set. For partitioned operations, one theory can submit multiple jobs. The redacted payload identifiers are not usable live credentials or blob IDs.