Json
load_batch ¶
load batch from json file or string io to batch object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename_or_io | Union[str, TextIO] | filename or file object pointing to | required |
*backend_args | args to pass to backend construction. | () | |
**backend_kwargs | kwargs to pass to backend construction. | {} |
Returns:
Type | Description |
---|---|
Union[RemoteBatch, LocalBatch] | Union[RemoteBatch, LocalBatch]: the resulting batch object |
Note
The backend args are not always required for LocalBatch
objects, but for RemoteBatch
objects they are required.
Source code in src/bloqade/task/json.py
save_batch ¶
save batch to json file or string io
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename_or_io | Union[str, TextIO] | filename or file object pointing to | required |
batch | Union[RemoteBatch, LocalBatch] | batch object to save. | required |