flex_rf.web.Batch
Type: class │ Base(s): WebContainer
Description
Section titled “Description”Interface for submitting several Simulation objects to sever.
Commonly one needs to submit a batch of Simulation. The built-in
Batch object is the best way to upload, start, monitor, and load a series of
tasks. The batch object is like a Job, but stores task metadata for a series of
simulations.
Parameters
Section titled “Parameters”simulations [dict[TaskName, discriminated_union(WorkflowType)] | tuple[discriminated_union(WorkflowType), ...]] |
|
Mapping of task names to Simulations to run as a batch. |
folder_name [str] = 'default' |
|
Name of folder to store member of each batch on web UI. |
verbose [bool] = True |
|
Whether to print info messages and progressbars. |
solver_version [str | None] = None |
|
Custom solver version to use, otherwise uses default for the current front end version. |
callback_url [str | None] = None |
|
Http PUT url to receive simulation finish event. The body content is a json file with fields |
simulation_type [BatchCategoryType | None] = None |
|
Type of each simulation in the batch, used internally only. |
parent_tasks [dict[str, tuple[TaskId, ...]] | None] = None |
|
Collection of parent task ids for each job in batch, used internally only. |
num_workers [PositiveInt | None] = factory: _default_batch_num_workers |
|
Number of workers for batch multi-threading where configurable. Corresponds to |
reduce_simulation [Literal['auto', True, False]] = 'auto' |
|
Whether to reduce structures in the simulation to the simulation domain only. Note: currently only implemented for the mode solver. |
pay_type [PayType | None] = None |
|
Specify the payment method. |
jobs_cached [dict[TaskName, Job] | None] = None |
|
Optional field to specify |
lazy [bool] = False |
|
Whether to load the actual data (lazy=False) or return a proxy that loads the data when accessed (lazy=True). |
Attributes
Section titled “Attributes”num_jobs [int] |
|
Number of jobs in the batch. |
Methods
Section titled “Methods”delete() |
|
Delete server-side data associated with each task in the batch. |
download(path_dir: PathLike = DEFAULT_DATA_DIR, replace_existing: bool = False) |
|
Download results of each task. |
estimate_cost(verbose: bool = True) |
|
Compute the maximum FlexCredit charge for a given |
from_file(fname: PathLike, group_path: str | None = None, lazy: bool = False, on_load: Callable[[Any], None] | None = None, **parse_obj_kwargs: Any) |
|
Load a |
get_info() |
|
Get information about each task in the |
get_run_info() |
|
get information about a each of the tasks in the |
jobs() |
|
Create a series of tasks in the |
load(path_dir: PathLike = DEFAULT_DATA_DIR, replace_existing: bool = False, skip_download: bool = False) |
|
Download results and load them into |
monitor(*, download_on_success: bool = False, path_dir: PathLike = DEFAULT_DATA_DIR, replace_existing: bool = False) |
|
Monitor progress of each running task. |
real_cost(verbose: bool = True) |
|
Get the sum of billed costs for each task associated with this batch. |
run(path_dir: PathLike = DEFAULT_DATA_DIR, priority: int | None = None, replace_existing: bool = False, vgpu_allocation: int | None = None, ignore_memory_limit: bool | None = None) |
|
Upload and run each simulation in |
start(priority: int | None = None, vgpu_allocation: int | None = None, ignore_memory_limit: bool | None = None) |
|
Start running all tasks in the |
to_file(fname: PathLike) |
|
Exports |
upload() |
|
Upload a series of tasks associated with this |