CategoricalNB with PipelineBinaryClassification
This example pairs the original TypeScript SDK integration test with the recorded responses from its successful ParallelModel pipeline run.
| Property | Recorded value |
|---|---|
| Test ID | 9.5.2.ML.Pipeline.PipelineBinaryClassification.TrainTestSplit.NaiveBayes.CategoricalNB |
| Algorithm family | Naive Bayes |
| Dataset | PipelineBinaryClassification |
| Acquisition | Uploaded CSV |
| Pipeline mode | DiagnosticTraining |
| Pipeline status | Succeeded |
| Evaluation ready | false |
| Prediction | Recorded (success) |
| Response events | 32 |
This example explicitly enables independent partition fitting for diagnostics. The recorded pipeline succeeded, but EvaluationReady is false; do not interpret its evaluation metrics as production-ready or leakage-safe validation.
Prerequisites
Install the TypeScript SDK and Jest in your Node.js project. The original source is a Jest integration test, not a standalone browser example. It uses the live ParallelModel service and reads the following environment variables from your environment or a local .env file.
PARALLELMODEL_REGION=<region>
PARALLELMODEL_CLIENT_ID=<client-id>
PARALLELMODEL_CLIENT_SECRET=<client-secret>
PARALLELMODEL_MODEL_ID=<model-id>
PARALLELMODEL_ENCRYPTION_KEY_1=<encryption-key>
PARALLELMODEL_COMPUTE_SIZE=<compute-size>
For the upload step, provide pipeline.binary.classification.csv in the test project’s Datasets directory, or use PARALLELMODEL_DATASETS_DIR. The CSV is not included in the supplied archives.
TypeScript example
The following code is preserved from the supplied test file. The response callback records each SDK operation and writes the execution transcript to the outputs directory.
import { test } from '@jest/globals';
import { existsSync } from 'node:fs';
import { mkdir, writeFile } from 'node:fs/promises';
import { dirname, resolve } from 'node:path';
import process from 'node:process';
import { fileURLToPath } from 'node:url';
import { inspect } from 'node:util';
import {
ParallelModelClient,
PipelineExecutionStatus,
PipelineMode,
PipelineSteps,
PipelineDataKind,
PipelinePredictionInputKind,
type TrainTestSplitJobSendRequestModel,
type CategoricalNBJobSendRequestModel
} from '@parallelmodel/sdk';
const projectDirectory = fileURLToPath(new URL('../', import.meta.url));
const logFile = resolve(projectDirectory, 'outputs', '9.5.2.ML.Pipeline.PipelineBinaryClassification.TrainTestSplit.NaiveBayes.CategoricalNB.text');
function required(name: string): string {
const value = process.env[name];
if (!value?.trim()) throw new Error(`Missing environment variable ${name}`);
return value;
}
test('9.5.2.ML.Pipeline.PipelineBinaryClassification.TrainTestSplit.NaiveBayes.CategoricalNB', async () => {
const lines: string[] = [];
const secrets: string[] = [];
function writeLine(message: string): void {
const safe = secrets.reduce((line, secret) => line.replaceAll(secret, '[redacted]'), message);
lines.push(safe);
console.log(safe);
}
try {
const envFile = [resolve(projectDirectory, '.env'), resolve(projectDirectory, '..', '.env')]
.find(path => existsSync(path));
if (envFile) process.loadEnvFile(envFile);
const modelId = required('PARALLELMODEL_MODEL_ID');
const computeSize = required('PARALLELMODEL_COMPUTE_SIZE');
const encryptionKey = required('PARALLELMODEL_ENCRYPTION_KEY_1');
const clientSecret = required('PARALLELMODEL_CLIENT_SECRET');
secrets.push(encryptionKey, clientSecret);
const parallelModelClient = new ParallelModelClient({
region: required('PARALLELMODEL_REGION'),
clientId: required('PARALLELMODEL_CLIENT_ID'),
clientSecret, timeout: 300_000, autoRefreshToken: true,
refreshBeforeExpiry: 120_000, retryOnUnauthorized: true, maxRetries: 3
});
const datasetFileName = 'pipeline.binary.classification.csv';
const datasetFilePath = [resolve(projectDirectory, 'Datasets', datasetFileName),
resolve(projectDirectory, '..', 'Datasets', datasetFileName),
...(process.env.PARALLELMODEL_DATASETS_DIR ? [resolve(process.env.PARALLELMODEL_DATASETS_DIR, datasetFileName)] : [])
].find(path => existsSync(path));
if (!datasetFilePath) throw new Error(`Dataset not found: Datasets/${datasetFileName}`);
const parallelModelPipeline = parallelModelClient.pipelineClient.create(modelId, {
mode: PipelineMode.DiagnosticTraining,
allowIndependentPartitionFitForDiagnostics: true,
computeSize,
defaultOutputKeyReference: 'key',
resolveEncryptionKey: () => encryptionKey,
apiTimeout: 300_000,
pollingInterval: 30_000
}).configure(
PipelineSteps.datasetUpload(datasetFilePath, "target", undefined, PipelineDataKind.Numeric),
PipelineSteps.modelSelection((dataset, outputName): TrainTestSplitJobSendRequestModel => ({
input: {
input_blob_id: dataset.blobId,
feature_columns: [...dataset.featureColumns],
target_column: dataset.targetColumn!,
file_format: dataset.fileFormat,
algorithm_type: "train_test_split",
algorithm_params: {
test_size: 0.2,
random_state: 42,
shuffle: true,
stratify: true
},
evaluation: {
test_size: 0.2,
random_state: 42,
shuffle: true,
stratify: true
},
generate_graphs: false
},
output: { name: outputName, tags: ["pipeline", "model-selection"] },
request_timeout_seconds: 300
})),
PipelineSteps.naiveBayes((partitions, outputName): CategoricalNBJobSendRequestModel => ({
input: {
train_blob_id: partitions.train.blobId,
test_blob_id: partitions.test.blobId,
classifier_type: "CategoricalNB",
classifier_params: {
alpha: 1.0
},
feature_columns: [...partitions.train.featureColumns],
file_format: partitions.train.fileFormat,
target_column: partitions.train.targetColumn!
},
output: { name: outputName, tags: ["pipeline", "naivebayes"] },
request_timeout_seconds: 300
})),
PipelineSteps.predict("Auto", [1, 1, 1, 1, 1, 1, 1, 1], PipelinePredictionInputKind.Transformed)
);
const pipelineRunResult = await parallelModelPipeline.runAsync({
onResponse(event) {
writeLine(`${event.module}/${event.algorithm} | ${event.partition} | ${event.operation}`);
writeLine(JSON.stringify(event.response) ?? 'undefined');
}
}, AbortSignal.timeout(119 * 60_000));
writeLine(`Pipeline status: ${pipelineRunResult.status}; EvaluationReady: ${pipelineRunResult.evaluationReady}`);
if (pipelineRunResult.status !== PipelineExecutionStatus.Succeeded) {
const message = pipelineRunResult.status === PipelineExecutionStatus.Cancelled
? 'Pipeline cancelled.' : 'Pipeline failed.';
throw new Error(message, { cause: pipelineRunResult.failure?.exception });
}
} catch (error) {
writeLine(inspect(error));
throw error;
} finally {
await mkdir(dirname(logFile), { recursive: true });
await writeFile(logFile, lines.join('\n') + '\n', 'utf8');
}
}, 120 * 60_000);
Recorded responses
The responses below follow the actual SDK callback order. Each step identifies the operation and partition from the source transcript. Identifiers and infrastructure names have been anonymised consistently; session cookies and keys are redacted. Result values, statuses, and timings are retained.
Download the complete execution trace (JSON)The downloadable trace includes every response event, including complete worker log arrays. The inline log previews show the first and last entries only.
Pipeline stages
| Stage | Partition | Response events |
|---|---|---|
Dataset/Upload | Dataset | 3 |
ModelSelection/TrainTestSplit | Dataset | 12 |
NaiveBayes/CategoricalNB | Both | 16 |
Predict/Auto | Both | 1 |
1. Dataset / Upload with Dataset
SDK step: PipelineSteps.datasetUpload(...).
Upload
{
"statusCode": 200,
"data": {
"id": "171cb6dd-66cc-46c5-a1ff-9ddfd3810b5b",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"application_id": "2d62b1579c84446da6c07e864e66eb6a",
"name": "pipeline.binary.classification.csv",
"description": "",
"blob_name": "3b43bdbaaae1462aadb67e4f5516b5d2/00748aae06164a5dadd98cb8ab508795.csv",
"container_name": "models",
"storage_account_name": "storage-0002",
"blob_version_id": "2026-12-05T20:45:20.5687138Z",
"file_size_bytes": 4648,
"record_status": "Available",
"record_type": "Generic",
"extension_type": "Csv",
"access_tier": "Hot",
"is_encrypted": true,
"encryption_algorithm_name": "CustomerProvidedAes256",
"created_by": "2d62b1579c84446da6c07e864e66eb6a",
"created_at": "2026-12-05T20:45:20.5848034+00:00",
"modified_by": "2d62b1579c84446da6c07e864e66eb6a",
"modified_at": "2026-12-05T20:45:20.5848034+00:00",
"is_deleted": false,
"deleted_by": "",
"deleted_at": null,
"last_access_by": "2d62b1579c84446da6c07e864e66eb6a",
"last_access_at": "2026-12-05T20:45:20.5848034+00:00",
"tags": [
"datasets",
"pipeline"
]
},
"text": "{\"id\":\"171cb6dd-66cc-46c5-a1ff-9ddfd3810b5b\",\"model_id\":\"3b43bdba-aae1-462a-adb6-7e4f5516b5d2\",\"application_id\":\"2d62b1579c84446da6c07e864e66eb6a\",\"name\":\"pipeline.binary.classification.csv\",\"description\":\"\",\"blob_name\":\"3b43bdbaaae1462aadb67e4f5516b5d2/00748aae06164a5dadd98cb8ab508795.csv\",\"container_name\":\"models\",\"storage_account_name\":\"storage-0002\",\"blob_version_id\":\"2026-12-05T20:45:20.5687138Z\",\"file_size_bytes\":4648,\"record_status\":\"Available\",\"record_type\":\"Generic\",\"extension_type\":\"Csv\",\"access_tier\":\"Hot\",\"is_encrypted\":true,\"encryption_algorithm_name\":\"CustomerProvidedAes256\",\"created_by\":\"2d62b1579c84446da6c07e864e66eb6a\",\"created_at\":\"2026-12-05T20:45:20.5848034+00:00\",\"modified_by\":\"2d62b1579c84446da6c07e864e66eb6a\",\"modified_at\":\"2026-12-05T20:45:20.5848034+00:00\",\"is_deleted\":false,\"deleted_by\":\"\",\"deleted_at\":null,\"last_access_by\":\"2d62b1579c84446da6c07e864e66eb6a\",\"last_access_at\":\"2026-12-05T20:45:20.5848034+00:00\",\"tags\":[\"datasets\",\"pipeline\"]}",
"headers": {
"api-supported-versions": "1.0",
"cache-control": "private",
"content-encoding": "gzip",
"content-type": "application/json; charset=utf-8",
"date": "Sat, 05 Dec 2026 20:45:19 GMT",
"set-cookie": "[redacted]",
"transfer-encoding": "chunked",
"vary": "Accept-Encoding",
"x-powered-by": "ASP.NET"
},
"ok": true
}
Download
{
"blobId": "171cb6dd-66cc-46c5-a1ff-9ddfd3810b5b",
"fileName": "pipeline.binary.classification.csv",
"fileSizeBytes": 4648
}
Inspect
{
"fileName": "pipeline.binary.classification.csv",
"fileExtension": ".csv",
"fileFormat": "csv",
"dataKind": "Numeric",
"columns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8",
"target"
],
"featureColumns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8"
],
"targetColumn": "target",
"columnDataTypes": {
"feature_1": "numeric",
"feature_2": "numeric",
"feature_3": "numeric",
"feature_4": "numeric",
"feature_5": "numeric",
"feature_6": "numeric",
"feature_7": "numeric",
"feature_8": "numeric",
"target": "numeric"
},
"rowCount": 240,
"columnCount": 9,
"fileSizeBytes": 4648
}
2. ModelSelection / TrainTestSplit with Dataset
SDK step: PipelineSteps.modelSelection(...).
Send
{
"start_time": "2026-12-05T20:45:31.9359334+00:00",
"end_time": "2026-12-05T20:45:32.0573725+00:00",
"elapsed_milliseconds": 121.44,
"status": "published",
"job_id": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"topic": "pm.topic.ml.modelselection",
"subscription": "cpu.0p5c.1gi",
"send_request_model": {
"job_id": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"json": {
"job_id": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"input": {
"input_blob_id": "171cb6dd-66cc-46c5-a1ff-9ddfd3810b5b",
"input_encryption_key": "[redacted]",
"feature_columns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8"
],
"file_format": "csv",
"algorithm_type": "train_test_split",
"algorithm_params": {
"test_size": 0.2,
"random_state": 42,
"shuffle": true,
"stratify": true
}
},
"request_timeout_seconds": 300,
"output": {
"name": "pipeline-e75191eb4365494d8b1a29a4e0076e56-02-ModelSelection-Dataset.zip",
"description": null,
"record_type": "Generic",
"access_tier": "Hot",
"tags": [
"pipeline",
"model-selection"
],
"encryption_key": "[redacted]"
},
"target_column": "target",
"evaluation": {
"test_size": 0.2,
"random_state": 42,
"shuffle": true,
"stratify": true
},
"generate_graphs": false
},
"topic": "pm.topic.ml.modelselection",
"subscription": "cpu.0p5c.1gi"
}
}
Status (3 responses)
[
{
"start_time": "2026-12-05T20:45:32.1274817+00:00",
"end_time": "2026-12-05T20:45:32.2675043+00:00",
"elapsed_milliseconds": 140.02,
"job_id": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"status": "processing",
"topic": "pm.topic.ml.modelselection",
"subscription": "cpu.0p5c.1gi"
},
{
"start_time": "2026-12-05T20:46:02.4780446+00:00",
"end_time": "2026-12-05T20:46:02.5740068+00:00",
"elapsed_milliseconds": 95.96,
"job_id": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"status": "processing",
"topic": "pm.topic.ml.modelselection",
"subscription": "cpu.0p5c.1gi"
},
{
"start_time": "2026-12-05T20:46:32.7619635+00:00",
"end_time": "2026-12-05T20:46:33.1190901+00:00",
"elapsed_milliseconds": 357.12,
"job_id": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"status": "completed",
"topic": "pm.topic.ml.modelselection",
"subscription": "cpu.0p5c.1gi"
}
]
Logs with 34 entries (preview)
Showing 2 of 34 entries. The complete log response is available in the execution trace above.
[
{
"start_time": "0001-01-01T00:00:00+00:00",
"end_time": "0001-01-01T00:00:00+00:00",
"elapsed_milliseconds": 0,
"timestamp": "2026-12-05T20:46:11.3992259+00:00",
"log": {
"status": "stage_started",
"stage": "checking delivery count",
"jobId": null
}
},
{
"start_time": "0001-01-01T00:00:00+00:00",
"end_time": "0001-01-01T00:00:00+00:00",
"elapsed_milliseconds": 0,
"timestamp": "2026-12-05T20:46:12.0497125+00:00",
"log": {
"status": "stage_completed",
"stage": "completing message",
"jobId": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"elapsed_seconds": 0
}
}
]
Result
{
"jobId": "8f8fc82c-d456-456e-ba7e-9fcd383847ec",
"execution": {
"executionName": "spmrgmlcae3caj4-csbj8",
"jobName": "spmrgmlcae3caj4",
"container": {
"hostname": "worker-0355",
"replicaName": "worker-0355",
"processId": 1
}
},
"algorithm_type": "train_test_split",
"stats": {
"row_count": 240,
"column_count": 9,
"feature_count": 8,
"training_row_count": 192,
"test_row_count": 48,
"feature_columns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8"
],
"target_columns": [
"target"
],
"file_format": "csv",
"task_type": "split",
"metrics": {
"artifact_count": 4
}
},
"effective_params": {
"test_size": 0.2,
"random_state": 42,
"shuffle": true,
"stratify": true
},
"learned": {
"fold_count": 1,
"fold_sizes": [
{
"train": 192,
"test": 48
}
]
},
"warnings": [],
"runtime": {
"captured_at_utc": "2026-12-05T20:46:11.922546+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": "model-selection-output.zip",
"artifact_files": [
"model.joblib",
"result.json",
"train.csv",
"test.csv",
"train_indices.csv",
"test_indices.csv"
]
}
Extract (6 responses)
[
{
"start_time": "2026-12-05T20:46:35.245276+00:00",
"end_time": "2026-12-05T20:46:36.4946006+00:00",
"elapsed_milliseconds": 1249.3,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "599724fa-35f5-48cc-b41b-13835974ec6c",
"uploaded_blob_id": "577cb2f4-7b87-4dcf-b25e-9fb14e5e159e",
"filename": "100a4c79-28e0-4a48-8042-8135fbe43891.joblib",
"source_path": "model.joblib",
"source_format": "joblib",
"size_bytes": 1113,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:46:36.5683183+00:00",
"end_time": "2026-12-05T20:46:37.3665878+00:00",
"elapsed_milliseconds": 798.26,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "599724fa-35f5-48cc-b41b-13835974ec6c",
"uploaded_blob_id": "df017837-b527-4d84-acc8-84c6e7159fdf",
"filename": "d892fbc2-8aac-4b3d-ac89-be0d58216652.json",
"source_path": "result.json",
"source_format": "json",
"size_bytes": 1889,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:46:37.4725705+00:00",
"end_time": "2026-12-05T20:46:38.4704781+00:00",
"elapsed_milliseconds": 997.89,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "599724fa-35f5-48cc-b41b-13835974ec6c",
"uploaded_blob_id": "0093526a-036c-4959-965d-12fd856c1550",
"filename": "d751d5e8-c6ec-48a9-b215-7f44afba40f6.csv",
"source_path": "train.csv",
"source_format": "csv",
"size_bytes": 3543,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:46:38.5317815+00:00",
"end_time": "2026-12-05T20:46:39.6163018+00:00",
"elapsed_milliseconds": 1084.51,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "599724fa-35f5-48cc-b41b-13835974ec6c",
"uploaded_blob_id": "33bd4aa2-bace-4e43-add6-bf34b40723dc",
"filename": "7ce51c9c-29f3-4d0b-9ac4-f46cedc7ca30.csv",
"source_path": "test.csv",
"source_format": "csv",
"size_bytes": 951,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:46:39.6774742+00:00",
"end_time": "2026-12-05T20:46:41.1750327+00:00",
"elapsed_milliseconds": 1497.55,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "599724fa-35f5-48cc-b41b-13835974ec6c",
"uploaded_blob_id": "fe436cb3-fc2e-4070-8269-4f56c068a9b1",
"filename": "c547ccb8-8d0b-4e33-ba92-919546a279d7.csv",
"source_path": "train_indices.csv",
"source_format": "csv",
"size_bytes": 690,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:46:41.2254659+00:00",
"end_time": "2026-12-05T20:46:42.6502079+00:00",
"elapsed_milliseconds": 1424.73,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "599724fa-35f5-48cc-b41b-13835974ec6c",
"uploaded_blob_id": "a335ba49-1ae6-459a-8238-41eefbaa98a5",
"filename": "7fa0d8e0-776c-4666-be75-fdc10e6cb8f9.csv",
"source_path": "test_indices.csv",
"source_format": "csv",
"size_bytes": 180,
"upload_status_code": 200
}
]
3. NaiveBayes / CategoricalNB with Both
SDK step: PipelineSteps.naiveBayes(...).
Send
{
"start_time": "2026-12-05T20:46:42.9875333+00:00",
"end_time": "2026-12-05T20:46:43.1423168+00:00",
"elapsed_milliseconds": 154.78,
"status": "published",
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"topic": "pm.topic.ml.naivebayes",
"subscription": "cpu.0p5c.1gi",
"send_request_model": {
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"json": {
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"input": {
"train_blob_id": "0093526a-036c-4959-965d-12fd856c1550",
"test_blob_id": "33bd4aa2-bace-4e43-add6-bf34b40723dc",
"train_encryption_key": "[redacted]",
"test_encryption_key": "[redacted]",
"classifier_type": "CategoricalNB",
"classifier_params": {
"alpha": 1
},
"feature_columns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8"
],
"file_format": "csv"
},
"request_timeout_seconds": 300,
"output": {
"name": "pipeline-e75191eb4365494d8b1a29a4e0076e56-03-NaiveBayes-Both.zip",
"description": null,
"record_type": "Generic",
"access_tier": "Hot",
"tags": [
"pipeline",
"naivebayes"
],
"encryption_key": "[redacted]",
"artifact_contract_version": "2.0"
},
"target_column": "target",
"evaluation": null
},
"topic": "pm.topic.ml.naivebayes",
"subscription": "cpu.0p5c.1gi"
}
}
Status (3 responses)
[
{
"start_time": "2026-12-05T20:46:43.2911654+00:00",
"end_time": "2026-12-05T20:46:43.36957+00:00",
"elapsed_milliseconds": 78.4,
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"status": "processing",
"topic": "pm.topic.ml.naivebayes",
"subscription": "cpu.0p5c.1gi"
},
{
"start_time": "2026-12-05T20:47:13.5782447+00:00",
"end_time": "2026-12-05T20:47:13.647837+00:00",
"elapsed_milliseconds": 69.59,
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"status": "processing",
"topic": "pm.topic.ml.naivebayes",
"subscription": "cpu.0p5c.1gi"
},
{
"start_time": "2026-12-05T20:47:43.843638+00:00",
"end_time": "2026-12-05T20:47:44.2354691+00:00",
"elapsed_milliseconds": 391.83,
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"status": "completed",
"topic": "pm.topic.ml.naivebayes",
"subscription": "cpu.0p5c.1gi"
}
]
Logs with 56 entries (preview)
Showing 2 of 56 entries. The complete log response is available in the execution trace above.
[
{
"start_time": "0001-01-01T00:00:00+00:00",
"end_time": "0001-01-01T00:00:00+00:00",
"elapsed_milliseconds": 0,
"timestamp": "2026-12-05T20:47:20.4140622+00:00",
"log": "{\"status\":\"stage_started\",\"stage\":\"checking delivery count\",\"jobId\":null}"
},
{
"start_time": "0001-01-01T00:00:00+00:00",
"end_time": "0001-01-01T00:00:00+00:00",
"elapsed_milliseconds": 0,
"timestamp": "2026-12-05T20:47:21.882586+00:00",
"log": "ities\":[0.9995615842320995,0.00043841576790021585]},{\"row_index\":231,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.0033044496347344418,0.9966955503652658]},{\"row_index\":232,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.02609814728731388,0.9739018527126865]},{\"row_index\":233,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.0032139369631193774,0.9967860630368804]},{\"row_index\":234,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.0244055850472901,0.9755944149527103]},{\"row_index\":235,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.13117717977423088,0.8688228202257693]},{\"row_index\":236,\"prediction\":0,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.7831409112860902,0.2168590887139095]},{\"row_index\":237,\"prediction\":0,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.9975207164479095,0.002479283552090342]},{\"row_index\":238,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.12721953949969564,0.8727804605003043]},{\"row_index\":239,\"prediction\":1,\"partition\":\"holdout\",\"decision_score\":null,\"probabilities\":[0.0017153415450161496,0.9982846584549837]}],\"warnings\":[],\"runtime\":{\"captured_at_utc\":\"2026-12-05T20:47:20.924403+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\":\"classifier-output.zip\",\"artifact_files\":[\"model/model.joblib\",\"predictions/predictions.csv\",\"graphs/performance.png\",\"graphs/performance.svg\",\"graphs/confusion_matrix.png\",\"graphs/confusion_matrix.svg\",\"graphs/prediction_distribution.png\",\"graphs/prediction_distribution.svg\",\"metrics/metrics.json\",\"result.json\"],\"classifier_type\":\"CategoricalNB\"},\"elapsed_seconds\":1.457,\"upload_status_code\":200,\"upload_response\":{\"id\":\"6902eb83-7879-4758-8095-6a9572e5c9a5\",\"model_id\":\"3b43bdba-aae1-462a-adb6-7e4f5516b5d2\",\"application_id\":\"spmrgmlcae2caj2\",\"name\":\"pipeline-e75191eb4365494d8b1a29a4e0076e56-03-NaiveBayes-Both.zip\",\"description\":\"Naive Bayes CategoricalNB artifacts, contract v2.0.\",\"blob_name\":\"3b43bdbaaae1462aadb67e4f5516b5d2/c8e1223674294ff28f525a840843346f.zip\",\"container_name\":\"models\",\"storage_account_name\":\"storage-0002\",\"blob_version_id\":\"2026-12-05T20:47:21.7927284Z\",\"file_size_bytes\":97996,\"record_status\":\"Available\",\"record_type\":\"Generic\",\"extension_type\":\"Unknown\",\"access_tier\":\"Hot\",\"is_encrypted\":true,\"encryption_algorithm_name\":\"CustomerProvidedAes256\",\"created_by\":\"spmrgmlcae2caj2\",\"created_at\":\"2026-12-05T20:47:21.8061078+00:00\",\"modified_by\":\"spmrgmlcae2caj2\",\"modified_at\":\"2026-12-05T20:47:21.8061078+00:00\",\"is_deleted\":false,\"deleted_by\":\"\",\"deleted_at\":null,\"last_access_by\":\"spmrgmlcae2caj2\",\"last_access_at\":\"2026-12-05T20:47:21.8061078+00:00\",\"tags\":[\"pipeline\",\"naivebayes\",\"classification\",\"training\",\"CategoricalNB\",\"zip\",\"joblib\",\"training-graphs\"]}}"
}
]
Result
{
"schema_version": "2.0",
"job_id": "6f9bde17-260a-46a9-943a-692b6ae68a92",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"status": "succeeded",
"worker": {
"name": "naive_bayes",
"task_family": "classification",
"algorithm": "CategoricalNB"
},
"input": {
"mode": "prepared_train_test",
"partitions": {
"train": {
"blob_id": "0093526a-036c-4959-965d-12fd856c1550",
"row_count": 192
},
"test": {
"blob_id": "33bd4aa2-bace-4e43-add6-bf34b40723dc",
"row_count": 48
}
},
"feature_columns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8"
],
"target_columns": [
"target"
]
},
"training": {
"effective_params": {
"alpha": 1,
"class_prior": null,
"fit_prior": true,
"force_alpha": true,
"min_categories": null
},
"metrics": {
"accuracy": 0.9114583333333334,
"f1_weighted": 0.9114559314217509,
"sample_count": 192,
"classes": [
0,
1
],
"confusion_matrix": [
[
88,
8
],
[
9,
87
]
]
}
},
"evaluation": {
"partition": "test",
"metrics": {
"accuracy": 0.875,
"f1_weighted": 0.8747826086956522,
"sample_count": 48,
"classes": [
0,
1
],
"confusion_matrix": [
[
20,
4
],
[
2,
22
]
]
}
},
"artifact_files": [
"model/model.joblib",
"predictions/predictions.csv",
"graphs/performance.png",
"graphs/performance.svg",
"graphs/confusion_matrix.png",
"graphs/confusion_matrix.svg",
"graphs/prediction_distribution.png",
"graphs/prediction_distribution.svg",
"metrics/metrics.json",
"result.json"
],
"extras": {
"algorithm": {
"learned": {
"n_features_in": 8,
"classes": [
0,
1
],
"class_count": [
96,
96
],
"class_log_prior": [
-0.6931471805599454,
-0.6931471805599454
],
"feature_log_prob_shape": [
8,
2,
2
],
"theta_shape": null
},
"warnings": [],
"data": {
"row_count": 240,
"column_count": 9,
"feature_count": 8,
"file_format": "csv",
"probability_classes": [
0,
1
]
},
"runtime": {
"captured_at_utc": "2026-12-05T20:47:20.924403+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"
}
},
"execution": {
"executionName": "spmrgmlcae2caj2-4vthx",
"jobName": "spmrgmlcae2caj2",
"container": {
"hostname": "worker-0356",
"replicaName": "worker-0356",
"processId": 1
}
}
},
"build": {
"built_at_utc": null,
"source": "unavailable",
"image_tag": null
}
}
}
Extract (10 responses)
[
{
"start_time": "2026-12-05T20:47:47.6183087+00:00",
"end_time": "2026-12-05T20:47:49.8160594+00:00",
"elapsed_milliseconds": 2197.74,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "87c9708e-80d2-4615-8e60-143c5be77c53",
"filename": "9393dc99-502a-49c9-8ead-362bc6d88c83.joblib",
"source_path": "model/model.joblib",
"source_format": "joblib",
"size_bytes": 1189,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:49.9075502+00:00",
"end_time": "2026-12-05T20:47:51.3507774+00:00",
"elapsed_milliseconds": 1443.22,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "59b26203-acdb-4472-9c19-c61c8a1bce2d",
"filename": "3866f339-d775-49ba-9eb3-ce2cd30d5a10.csv",
"source_path": "predictions/predictions.csv",
"source_format": "csv",
"size_bytes": 13988,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:51.4088045+00:00",
"end_time": "2026-12-05T20:47:52.8696818+00:00",
"elapsed_milliseconds": 1460.87,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "9ecb8255-e9ea-4641-9e52-180c25ba4cbe",
"filename": "871ef939-c604-44d0-a5d3-dfa8e5ed74cc.png",
"source_path": "graphs/performance.png",
"source_format": "png",
"size_bytes": 32130,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:52.9360962+00:00",
"end_time": "2026-12-05T20:47:55.0190325+00:00",
"elapsed_milliseconds": 2082.92,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "4ea2fab5-1ee4-4c61-84c2-b44d1ea340ac",
"filename": "edd0f4cf-a442-4e14-b502-4dd41e54ec9c.svg",
"source_path": "graphs/performance.svg",
"source_format": "svg",
"size_bytes": 27639,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:55.2424516+00:00",
"end_time": "2026-12-05T20:47:56.6884459+00:00",
"elapsed_milliseconds": 1445.98,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "55e8d706-0838-4be6-b618-46412b5bca3d",
"filename": "9bd72cd7-1967-40ef-b4cf-2f13b7c9d669.png",
"source_path": "graphs/confusion_matrix.png",
"source_format": "png",
"size_bytes": 35894,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:56.7597982+00:00",
"end_time": "2026-12-05T20:47:58.3231637+00:00",
"elapsed_milliseconds": 1563.35,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "5f7439cd-6989-4dd7-a2f0-3fb3c1d835bd",
"filename": "b153b2ee-7e1d-4461-81e1-c28634ad260d.svg",
"source_path": "graphs/confusion_matrix.svg",
"source_format": "svg",
"size_bytes": 35452,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:58.3787202+00:00",
"end_time": "2026-12-05T20:47:59.8178492+00:00",
"elapsed_milliseconds": 1439.12,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "c1468988-03f7-406e-b49b-f029eeaad901",
"filename": "2dfe772c-5fa8-4cb3-8fab-3414c42cc8ce.png",
"source_path": "graphs/prediction_distribution.png",
"source_format": "png",
"size_bytes": 26796,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:47:59.9029744+00:00",
"end_time": "2026-12-05T20:48:01.4618487+00:00",
"elapsed_milliseconds": 1558.86,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "bc4562e3-7018-487e-bd11-2c85240ee528",
"filename": "f2af1d66-14be-4751-8a14-9e154326396a.svg",
"source_path": "graphs/prediction_distribution.svg",
"source_format": "svg",
"size_bytes": 22328,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:48:01.5085187+00:00",
"end_time": "2026-12-05T20:48:02.9274108+00:00",
"elapsed_milliseconds": 1418.88,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "329b94ec-0120-4bd2-b6d3-eda75ba892ea",
"filename": "1cb66d26-c2cd-4b09-b209-960f8b79cd7d.json",
"source_path": "metrics/metrics.json",
"source_format": "json",
"size_bytes": 228,
"upload_status_code": 200
},
{
"start_time": "2026-12-05T20:48:02.992513+00:00",
"end_time": "2026-12-05T20:48:05.3001948+00:00",
"elapsed_milliseconds": 2307.66,
"status": "uploaded",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"source_blob_id": "6902eb83-7879-4758-8095-6a9572e5c9a5",
"uploaded_blob_id": "540b3e88-a5e3-4bcc-81b8-c2fac42c7cbd",
"filename": "fd19533e-05ca-47aa-9947-d54c48752e5e.json",
"source_path": "result.json",
"source_format": "json",
"size_bytes": 3715,
"upload_status_code": 200
}
]
4. Predict / Auto with Both
SDK step: PipelineSteps.predict(...).
Predict
{
"status": "success",
"request_id": "9bba8adc-08bf-4025-92d2-3f011f5e552f",
"model_id": "3b43bdba-aae1-462a-adb6-7e4f5516b5d2",
"model_blob_id": "87c9708e-80d2-4615-8e60-143c5be77c53",
"model_type": "sklearn.naive_bayes.CategoricalNB",
"requested_inference_type": "Auto",
"resolved_inference_type": "Predict",
"predictions": [
{
"row_index": 0,
"values": {
"prediction_0": 1
}
}
],
"stats": {
"row_count": 1,
"feature_count": 8,
"output_count": 1,
"feature_columns": [
"feature_1",
"feature_2",
"feature_3",
"feature_4",
"feature_5",
"feature_6",
"feature_7",
"feature_8"
],
"output_columns": [
"prediction_0"
],
"input_layout": "numpy",
"output_summary": {
"prediction_0": {
"min": 1,
"max": 1,
"mean": 1
}
}
},
"training_metrics": {},
"evaluation_metrics": {},
"learned": {
"classes": [
0,
1
]
},
"warnings": [],
"elapsed_seconds": 0.002582
}
Final pipeline status
Pipeline status: Succeeded; EvaluationReady: false
The status above is the final line from the matching execution output.