"WolframBatch" (Batch Computation Provider)
Details
Environment Properties
Job Settings
| "RemoteMachineClass" | "Basic1x8" | type of computing resource to use | |
| "RemoteGeoZone" | Automatic | geographical zone to run the job in |
| "Basic1x8" | basic machine class with 1 CPU core and 8 GB of memory | |
| "Basic2x8" | 2 CPU cores and 8 GB of memory | |
| "Basic4x16" | 4 CPU cores and 16 GB of memory | |
| "Memory8x64" | memory-optimized class with 8 CPU cores and 64 GB of memory | |
| "Memory16x128" | 16 CPU cores and 128 GB of memory | |
| "Memory192x1536" | 192 CPU cores and 1536 GB of memory | |
| "Compute64x128" | compute-optimized class with 64 CPU cores and 128 GB of memory | |
| "Compute192x384" | 192 CPU cores and 384 GB of memory | |
| "GPU1xL40S" | 1 NVIDIA L40S GPU with 44 GiB of GPU memory | |
| "GPU4xL4" | 4 NVIDIA L4 GPUs with 89 GiB of total GPU memory |
| "UnitedStates" | job runs in the United States | |
| "EuropeanUnion" | job runs in the European Union |
Job Notifications
| "Email" | sends an email to the address specified by $WolframID | |
| "SMS" | sends an SMS text message to $MobilePhone |
| "JobStarting" | job is no longer queued and is preparing to start | |
| "JobStarted" | job has started running | |
| "JobCompleted" | job has succeeded or terminated | |
| "JobSucceeded" | job succeeded producing a result | |
| "JobTerminated" | job terminated abnormally | |
| "JobStatusChanged" | issued for all job status change events |
| "Hourly" | approximately every hour while job is running | |
| "Daily" | approximately every day while job is running | |
| {"HoursElapsed",n} | approximately every n hours since job creation |
| {"JobCreditsUsed",n} | every time approximately n credits have been consumed |
Job Statuses
| "Queued" | the job is waiting for compute resources to be available | |
| "Starting" | the job has been scheduled to an instance and its container image is being downloaded | |
| "Running" | the job's container has started | |
| "Succeeded" | the job's execution has succeeded and its output has been uploaded | |
| "Terminated" | the job has been aborted or stopped due to errors |
Job Properties
| "CreditsSpent" | number of Service Credits spent by the job | |
| "JobExitCode" | exit code returned by the kernel within the job container | |
| "JobLogData" | console log and timestamp data as a list | |
| "JobLogString" | console logs from the job container | |
| "JobLogTabular" | console log and timestamp data in Tabular format | |
| "JobStatusReason" | string describing the reason for which the job is in its current state | |
| "OutputPreviewImage" | image preview of the job's evaluation result |
| "CreditsSpent" | number of Service Credits spent by the job | |
| "JobStatusReason" | string describing the reason for which the job is in its current state | |
| "OutputPreviewImage" | image preview of the first child job's evaluation result |
| "JobLogString" | console logs from the job container |
Examples
open all close allBasic Examples (1)
The default remote batch environment is "WolframBatch":
$DefaultRemoteBatchSubmissionEnvironmentSubmit a job using the default "WolframBatch" environment. RemoteBatchSubmit returns a RemoteBatchJobObject that allows you to manage and view the state of the job:
job = RemoteBatchSubmit[2 + 2]job["JobStatus"]Query the job status again, after it has completed:
job["JobStatus"]job["EvaluationResult"]Job Settings (4)
RemoteMachineClass (3)
Train a neural network using a single GPU:
job = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> "GPU"], RemoteMachineClass -> "GPU1xL40S"]Training progress is reported in the console log:
StringCases[job["JobLogString"], "Starting training" ~~ __]//FirstUse the resulting net to classify a difficult digit:
job["EvaluationResult"]%[[image], "TopProbabilities"]Train a neural network using multiple GPUs:
job = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> {"GPU", All}, BatchSize -> 512], RemoteMachineClass -> "GPU4xL4"]Perform batch inference using a GPU:
job = RemoteBatchSubmit[Counts[NetModel["Wolfram ImageIdentify Net V1"][Flatten@Table[RandomImage[max], {max, .1, 10, .1}, 10], TargetDevice -> "GPU"]], RemoteMachineClass -> "GPU1xL40S"]job["EvaluationResult"]Properties & Relations (8)
Run a batch job on a computer with a large memory capacity:
RemoteBatchSubmit[FactorInteger[2 ^ 1023 - 7], RemoteMachineClass -> "Memory8x64"]Run a batch job with a given service credit budget:
RemoteBatchSubmit[FactorInteger[2 ^ 1023 - 7], CreditConstraint -> Quantity[700, "Credits"]]Run a batch job with a given maximum runtime:
RemoteBatchSubmit[FactorInteger[2 ^ 1023 - 7], TimeConstraint -> Quantity[10, "Hours"]]Receive SMS text notifications for job state change events:
RemoteBatchSubmit[FactorInteger[2 ^ 1023 - 7],
RemoteJobNotifications -> {"JobStatusChanged" -> "SMS"}
]Receive text notifications when the job starts and finishes, and emails every 2 hours while it runs:
RemoteBatchSubmit[FactorInteger[2 ^ 1023 - 7],
RemoteJobNotifications -> {{"JobStarted", "JobCompleted"} -> "SMS", {"HoursElapsed", 2} -> "Email"}
]Do not produce any notifications:
RemoteBatchSubmit[$Version, RemoteJobNotifications -> None]Use a default set of notifications:
job = RemoteBatchSubmit[$Version, RemoteJobNotifications -> Automatic]Verify the detailed specification used for the default notifications:
job["RemoteJobNotifications"]Receive a notification when a job either succeeds or terminates:
job = RemoteBatchSubmit[$Version, RemoteJobNotifications -> "JobCompleted"]Verify the detailed notification specification:
job["RemoteJobNotifications"]Possible Issues (4)
Jobs that exceed their memory limit are terminated:
job = RemoteBatchSubmit[Array[Range[1, #]&, 38000]]job["JobStatus"]Neural network operations use the CPU by default, even if a job’s machine class has GPU hardware available:
job1 = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST"], RemoteMachineClass -> "GPU1xL40S"]StringCases[job1["JobLog"], "Device:" ~~ Except["
"]..]//FirstSpecify the TargetDevice option in order to use a GPU for training or inference:
job2 = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> "GPU"], RemoteMachineClass -> "GPU1xL40S"]StringCases[job2["JobLog"], "Device:" ~~ Except["
"]..]//FirstNetTrain[…,TargetDevice"GPU"] uses a single GPU, regardless of the number of GPUs available to the job:
job1 = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> "GPU", BatchSize -> 128], RemoteMachineClass -> "GPU4xL4"]StringCases[job1["JobLog"], "Device:" ~~ Except["
"]..]//FirstSpecify TargetDevice{"GPU",All} in order to use all available GPUs for training:
job2 = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> {"GPU", All}, BatchSize -> 128], RemoteMachineClass -> "GPU4xL4"]StringCases[job2["JobLog"], "Device:" ~~ Except["
"]..]//FirstMulti-GPU inference is not supported:
job3 = With[{net = job2["EvaluationResult"]}, RemoteBatchSubmit[net[Table[RandomImage[1], 50], TargetDevice -> {"GPU", All}], RemoteMachineClass -> "GPU4xL4"]]job3["EvaluationMessagesText"]Multi-GPU training fails if a batch size is not specified:
job1 = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> {"GPU", All}], RemoteMachineClass -> "GPU4xL4"]{job1["EvaluationResult"], job1["EvaluationMessagesText"]}Specify the BatchSize option when performing training on multiple GPUs:
job2 = RemoteBatchSubmit[NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> {"GPU", All}, BatchSize -> 128], RemoteMachineClass -> "GPU4xL4"]job2["EvaluationResult"]Tech Notes
History
Introduced in 2025 (14.3)