Multiprocessing
toksearch.backend.multiprocessing.MultiprocessingConfig
dataclass
Configuration for the multiprocessing backend
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_workers |
Optional[int]
|
The number of workers to use for parallel processing. If set to None (the default), half the number of CPUs on the machine will be used. |
None
|
batch_size |
Union[str, int]
|
The batch size to use for parallel processing, passed to joblib.Parallel. Defaults to "auto". |
'auto'
|
toksearch.backend.multiprocessing.MultiprocessingRecordSet
Bases: RecordSet
from_records(records, config=None)
classmethod
Create a MultiprocessingRecordSet from a list of records
Parameters:
Name | Type | Description | Default |
---|---|---|---|
records |
List[Record]
|
The records to create the record set from |
required |
config |
Optional[MultiprocessingConfig]
|
The configuration for the multiprocessing backend |
None
|
Returns:
Name | Type | Description |
---|---|---|
MultiprocessingRecordSet |
MultiprocessingRecordSet
|
The record set |