resume_from_checkpoint
full name: tenpy.simulations.simulation.resume_from_checkpoint
parent module:
tenpy.simulations.simulationtype: function
- tenpy.simulations.simulation.resume_from_checkpoint(*, filename=None, checkpoint_results=None, update_sim_params=None, simulation_class_kwargs=None)[source]
Resume a simulation run from a given checkpoint.
(All parameters have to be given as keyword arguments.)
- Parameters:
filename (None | str) – The filename of the checkpoint to be loaded. You can either specify the filename or the checkpoint_results.
checkpoint_results (None | dict) – Alternatively to filename the results of the simulation so far, i.e. directly the data dictionary saved at a simulation checkpoint.
update_sim_params (None | dict) – Allows to update specific
Simulationparameters; ignored if None. Usesupdate_recursive()to update values, such that the keys of update_sim_params can be recursive, e.g. algorithm_params/max_sweeps.simulation_class_kwargs (None | dict) – Further keyword arguments given to the simulation class, ignored if None.
- Returns:
The results from running the simulation, i.e., what
resume_run()returned.- Return type:
Notes
The checkpoint_filename should be relative to the current working directory. If you use the
Simulation.directory, the simulation class will attempt to change to that directory during initialization. Hence, either resume the simulation from the same directory where you originally started, or update theSimulation.directory(and :cfg:option`Simulation.output_filename`) parameter with update_sim_params.