Checkpointing
A checkpointing actor can take user-defined checkpoints from current computations and restore them on demand.
Actors.checkpointing — Functioncheckpointing(level=1, filename::AbstractString=""; kwargs...)Start a checkpointing actor and return a Link to it.
Arguments
filename::AbstractString: filename where the actor should save its checkpointing buffer,on::Bool=false: should checkpoints automatically be updated and saved,update::Int=10: update interval in seconds ≥ 1,save::Int=60: saving interval in seconds ≥ 1,kwargs...: keyword arguments tospawn.
Updating or saving is only done automatically if their intervals are ≥ 1 seconds.
Actors.checkpoint — Functioncheckpoint(cp::Link, key::Symbol, args...)Tell a checkpointing actor to take a checkpoint.
Arguments
cp::Link:Linkto the checkpointing actor,key::Symbol: key for the checkpoint,args...: variables to save in the checkpoint,level::Int=1: checkpoint level.
Actors.restore — Functionrestore(cp::Link; key::Symbol)Tell a checkpointing actor to restore the last taken checkpoint.
Arguments
cp::Link:Linkto the checkpointing actor,key::Symbol: checkpoint key,level::Int=1: checkpoint level to restore from.
Actors.register_checkpoint — FunctionRegister a checkpointing actor to a higher level actor.
Actors.@chkey — Macro@chkey a b c 123Build a checkpointing key from the surrounding module and function names and the given arguments. This is intended for easy construction of checkpointing keys.
Example
module MyModule
using Actors
function mykey()
a = 1
b = 2
c = 3
# do something
return @chkey a b c 123
end
export mykey
end # MyModule
julia> using .MyModule
julia> mykey()
:MyModule_mykey_a_b_c_123Actors.set_interval — Functionset_interval(cp::Link; kwargs...)Set the checkpointing intervals of a checkpointing actor cp.
Arguments
cp::Link:Linkto a checkpointing actor,kwargs...: allowed keyword arguments:on:Bool: should checkpoints automatically be updated and saved,update::Int: update interval in seconds ≥ 1,save::Int: saving interval in seconds ≥ 1.
Actors.get_interval — FunctionGet the checkpointing intervals of a checkpointing actor.
Actors.start_checkpointing — FunctionStart periodic checkpointing.
Actors.stop_checkpointing — FunctionStop periodic checkpointing.
Actors.get_checkpoints — FunctionTell the checkpointing actor cp to return its stored checkpoint data.
Actors.save_checkpoints — FunctionTell a checkpointing actor cp to save its stored checkpoint data.
Actors.load_checkpoints — FunctionTell a checkpointing actor cp to load checkpointing data from a file