pub struct JobSpec {
pub schema_version: String,
pub request_key: String,
pub problem: Problem,
pub optimizer: Optimizer,
pub execution: Execution,
pub budget: Budget,
pub outputs: Outputs,
}Expand description
A job of the format fcmaes.job/0.1, which the native fcmaes worker runs.
Fields§
§schema_version: StringExactly fcmaes.job/0.1.
request_key: StringThe caller-chosen idempotency key, 1 to 200 bytes.
problem: ProblemThe registered problem.
optimizer: OptimizerThe optimizer of the retries.
execution: ExecutionThe seed and parallelism of the retries.
budget: BudgetThe retries, evaluations and time of the job.
outputs: OutputsWhat the job reports as progress.
Implementations§
Source§impl JobSpec
impl JobSpec
Sourcepub fn resolve(self) -> Result<Self>
pub fn resolve(self) -> Result<Self>
Checks the job and resolves its defaults: the schema and problem, the bounds, positive counts, the time limits, the progress mode, the population and the optimizer’s limit mode. The evaluation totals must not overflow.
Sourcepub fn requested(&self) -> Result<u64>
pub fn requested(&self) -> Result<u64>
The evaluations the job requests: retries * evaluations_per_retry.
Sourcepub fn maximum_evaluations(&self) -> Result<u64>
pub fn maximum_evaluations(&self) -> Result<u64>
The most evaluations the job can use: DE may exceed each retry’s
evaluations by 2 * population - 1.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobSpec
impl<'de> Deserialize<'de> for JobSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for JobSpec
Auto Trait Implementations§
impl Forget for JobSpec
impl Freeze for JobSpec
impl Move for JobSpec
impl RefUnwindSafe for JobSpec
impl Send for JobSpec
impl Sync for JobSpec
impl Unpin for JobSpec
impl UnsafeUnpin for JobSpec
impl UnwindSafe for JobSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more