Checkpoint API

Checkpointer Mixin


Checkpoint to save and restore attributes.

class sail_on_client.checkpointer.Checkpointer[source]

Checkpoint object to save and restore attributes.

__init__(toolset)[source]

Initialize.

Parameters

toolset (Dict) – Dictionary with parameter for the mixin

Returns

None

Return type

None

_restore_elementwise_attribute(detector, attribute_name, attribute_val)[source]

Private method to restore attributes element wise.

Parameters
  • detector (Any) – Instance of novelty detector

  • attribute_name (str) – Name of the detector attribute that needs to be saved

  • attribute_val (Dict) – A dictonary containing value for attributes

Return type

Any

Returns

Detector with updated value for attributes

Return type

Any

Parameters
  • detector (Any) –

  • attribute_name (str) –

  • attribute_val (Dict) –

_save_elementwise_attribute(detector, attribute, attribute_dict)[source]

Private method to save attributes element wise.

Parameters
  • detector (Any) – Instance of novelty detector

  • attribute (str) – Name of the detector attribute that needs to be saved

  • dict (attribute) – A dictonary containing attribute value for other tests

  • attribute_dict (Dict) –

Return type

Dict

Returns

Update attribute dictionary

restore_attributes(step_descriptor)[source]

Restore attribute for a detector.

Parameters

step_descriptor (str) – String describing steps for protocol

Return type

None

Returns

None

save_attributes(step_descriptor)[source]

Save attribute for a detector.

Parameters

step_descriptor (str) – String describing steps for protocol

Return type

None

Returns

None

Return type

None

Parameters

step_descriptor (str) –