Saves the generator’s state to a checkpoint file in dirpath.
Does nothing if any of the generator’s variants are generated lazily.
- Parameters:
dirpath (str) – Directory to write the checkpoint file to.
session_str (str) – Unique identifier of the current run session, used
in the checkpoint file name.
- Returns:
False if the generator wasn’t saved, otherwise None.
- Return type:
bool | None