ksuit.initializers.previous_run_initializer =========================================== .. py:module:: ksuit.initializers.previous_run_initializer Classes ------- .. autoapisummary:: ksuit.initializers.previous_run_initializer.PreviousRunInitializer Module Contents --------------- .. py:class:: PreviousRunInitializer(initializer_config, **kwargs) Bases: :py:obj:`ksuit.initializers.base.CheckpointInitializer` Initializes a model from a checkpoint of a previous run (specified by the run_id), this initializers assumes that the previous run is over, and hence only loads model weights. When a previous run should be resumed for further training, use ResumeInitializer instead. .. rubric:: Example ```yaml model: ... # model config dim: 64 initializers: - kind: ksuit.initializers.PreviousRunInitializer model_info: ema=0.9999 checkpoint: latest model_name: pointnet run_id: 2025-11-01_8zlau ``` When training, the stage name is usually "train". Checkpoint is usually "latest" or "best_loss", depending on which checkpoint you want to load. Model_info is an optional string that is used as suffix in the checkpoint filename. Model_name is the name of the model to load, which should match the model_name used in CheckpointCallback during the previous run. :param initializer_config: Configuration for the initializer. Implements `PreviousRunInitializerConfig` schema. :param \*\*kwargs: additional arguments to pass to the parent class. Initialize model from checkpoint. :param initializer_config: configuration for the initializer. Implements the `CheckpointInitializerConfig` schema. :param \*\*kwargs: additional arguments to pass to the parent class. .. py:attribute:: keys_to_remove .. py:attribute:: patterns_to_remove .. py:attribute:: patterns_to_rename .. py:attribute:: patterns_to_instantiate .. py:method:: init_weights(model, model_name = None) Initialize the model weights from the checkpoint. :param model: the model to load the weights into.