Required
d| Type: | dict |
| Description: | JSON dictionary of the task. |
def read_task_from_json(d: dict) -> Task: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def validate_keys(
required: set, obtained: set, key: str, partial_update: bool = False
) -> None: ...| Type: | set |
| Description: | Set of required items. |
| Type: | set |
| Description: | Set of obtained items. |
| Type: | str |
| Description: | Description of the set (just for printing nicer errors). |
| Type: | bool |
| Default value: | False |
| Description: | Allow partial update that does not necessarily contain all required keys. |
class Task(salvus.flow.utils.serialization_helpers.SerializationMixin):
def __init__(self): ...str)-Task name.def from_json(d: dict) -> typing.Self: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskCustom(salvus.opt.tasks.Task):
def __init__(
self, info: dict[str, int | str | float | SerializationMixin]
): ...| Type: | dict[str, int | str | float | SerializationMixin] |
| Description: | Custom task specification. |
str)-Task name.def from_json(d: dict) -> TaskCustom: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(
self, result: dict[str, int | str | float | SerializationMixin]
) -> None: ...| Type: | dict[str, int | str | float | SerializationMixin] |
| Description: | Task results. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskEventSelection(salvus.opt.tasks.Task):
def __init__(
self, events: list[str], required_events: list[str] | None = None
): ...| Type: | list[str] |
| Description: | List of events to choose from. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | List of required events. |
str)-Task name.def from_json(d: dict) -> TaskEventSelection: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(self, selection: list[bool]) -> None: ...| Type: | list[bool] |
| Description: | Boolean list selecting / deselecting events. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskFinalizeIteration(salvus.opt.tasks.Task):
def __init__(
self,
info: dict[str, int | str | float | SerializationMixin] | None = None,
): ...| Type: | dict[str, int | str | float | SerializationMixin] | None |
| Default value: | None |
| Description: | Custom task specification. |
str)-Task name.def from_json(d: dict) -> TaskFinalizeIteration: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(self) -> None: ...def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskGradients(salvus.opt.tasks.Task):
def __init__(self, model: str, events: list[str]): ...| Type: | str |
| Description: | Model |
| Type: | list[str] |
| Description: | List of events. |
str)-Task name.def from_json(d: dict) -> TaskGradients: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(
self, gradients: dict[str, typing.Any], partial_update: bool = False
) -> None: ...| Type: | dict[str, typing.Any] |
| Description: | Dictionary with event-specific gradients. |
| Type: | bool |
| Default value: | False |
| Description: | Allow partial updates for a subset of data. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskMisfits(salvus.opt.tasks.Task):
def __init__(self, model: str, events: list[str]): ...| Type: | str |
| Description: | Model |
| Type: | list[str] |
| Description: | List of events. |
str)-Task name.def from_json(d: dict) -> TaskMisfits: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(
self, misfits: dict[str, float], partial_update: bool = False
) -> None: ...| Type: | dict[str, float] |
| Description: | Dictionary with event-specific misfits. |
| Type: | bool |
| Default value: | False |
| Description: | Allow partial updates for a subset of data. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskMisfitsAndGradients(salvus.opt.tasks.Task):
def __init__(self, model: str, events: list[str]): ...| Type: | str |
| Description: | Model |
| Type: | list[str] |
| Description: | List of events. |
str)-Task name.def from_json(d: dict) -> TaskMisfitsAndGradients: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(
self, misfits: dict[str, float], gradients: dict[str, typing.Any]
) -> None: ...| Type: | dict[str, float] |
| Description: | Dictionary with event-specific misfits. |
| Type: | dict[str, typing.Any] |
| Description: | Dictionary with event-specific gradients. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskMisfitsAndSummedGradient(salvus.opt.tasks.Task, typing.Generic):
def __init__(self, model: str, events: list[str]): ...| Type: | str |
| Description: | Model |
| Type: | list[str] |
| Description: | List of events. |
str)-Task name.def from_json(d: dict) -> TaskMisfitsAndSummedGradient: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(
self,
misfits: dict[str, float],
gradient: dict[str, typing.Any] | ModelType,
) -> None: ...| Type: | dict[str, float] |
| Description: | Dictionary with event-specific misfits. |
| Type: | dict[str, typing.Any] | ModelType |
| Description: | Summed gradient. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |
class TaskPreconditioner(salvus.opt.tasks.Task, typing.Generic):
def __init__(self, model: str | ModelType): ...| Type: | str | ModelType |
| Description: | Model to apply the preconditioner to. |
str)-Task name.def from_json(d: dict) -> TaskPreconditioner: ...| Type: | dict |
| Description: | JSON dictionary of the task. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_results(
self,
preconditioned_model: str | ModelType | None = None,
info: dict[str, str] | None = None,
) -> None: ...| Type: | str | ModelType | None |
| Default value: | None |
| Description: | Preconditioned model. |
| Type: | dict[str, str] | None |
| Default value: | None |
| Description: | Auxiliary information, e.g., the job name of a running simulation. |
def update_status(self, status: _valid_status) -> None: ...| Type: | _valid_status |
| Description: | New status. |
def validate(self, success: bool = False) -> None: ...| Type: | bool |
| Default value: | False |
| Description: | Raise if task has not been completed ( status="done"). |