pyspark.TaskContext.cpus

TaskContext.cpus() → int[source]

CPUs allocated to the task.

Returns
int

the number of CPUs.