D3 - batch endpoints and batch inference

CLIENT / PIPELINE
      │
      │ invoke
      ▼
BATCH ENDPOINT
      │
      ▼
BATCH DEPLOYMENT
      │
      ▼
BATCH JOB
      │
      ├── input data
      ├── model
      ├── environment
      └── compute cluster
      │
      ▼
parallel processing
      │
      ▼
persisted predictions
submit inference workload
        ↓
batch job executes asynchronously
        ↓
results persisted

compute

Worker 1
├── file001
├── file002
└── file003

Worker 2
├── file004
├── file005
└── file006
def init():
    # load model once per worker

def run(mini_batch):
    # process this chunk
    # return predictions

outputs

invoke
  ↓
job ID/status
  ↓
processing
  ↓
results persisted

failures

rollout and monitoring

                 MONTHLY SCHEDULE
                        │
                        ▼
                 BATCH ENDPOINT
                        │
                        ▼
                  deployment-v28
                        │
                        ▼
                CPU COMPUTE CLUSTER
                  min_nodes = 0
                        │
                scale up on job
                        │
                        ▼
                  2 TB INPUT DATA
                        │
                 partition/minibatch
	 ┌──────────────┼──────────────┐
	 ▼                                          ▼                                          ▼
   Worker 1                            Worker 2                            Worker N
	 │                                         │                                         │
   init()                                       init()                                  init()
	 │                                         │                                         │
  batch A                                   batch B                                   batch C
	 │                                         │                                         │
	 └──────────────┼──────────────┘
						▼
					PREDICTIONS
						│
						▼
					Azure Storage
						│
						▼
					job completes
						│
						▼
				    scale back to 0