You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d0d286b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/source/user-guide/strategies.rst
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Available implementations
26
26
27
27
* ``single`` (:class:`~xanesnet.strategies.single.Single`) trains one model on the configured training and validation split.
28
28
It uses ``inferencer_type: basic`` for inference.
29
-
* ``kfold`` (:class:`~xanesnet.strategies.kfold.KFold`) splits the full dataset into folds and trains one model for each fold.
29
+
* ``kfold`` (:class:`~xanesnet.strategies.kfold.KFold`) splits the full dataset into folds by default and trains one model for each fold.
30
30
All fold models are retained and combined with ``inferencer_type: ensemble``.
31
31
* ``bootstrap`` (:class:`~xanesnet.strategies.bootstrap.Bootstrap`) trains several models on bootstrap resamples of the training subset. \
32
32
The ensemble inferencer combines their predictions.
@@ -62,11 +62,12 @@ Model-specific data and encodings
62
62
---------------------------------
63
63
64
64
Every training strategy writes one ``split_indices.json`` file containing the train and validation indices for each model, in model order.
65
+
Set ``dataset.split_indexfile`` to this file to explicitly reuse those plans in another training run.
65
66
Strategies with shared data, such as ``single`` and ``deep_ensemble``, record the same configured split for each model.
66
67
``bootstrap`` records each resample, while ``kfold`` records each fold.
67
68
Multi-device Lightning workers reuse these exact plans instead of drawing their own.
68
69
69
-
K-fold training creates folds from the full dataset and ignores the configured dataset splits.
70
+
K-fold training creates folds from the full dataset. A configured file must provide one fold plan per model.
70
71
``n_splits`` must not exceed the number of dataset samples.
71
72
All fold models share one encoding, whose automatic fields are resolved from the full dataset before the folds are trained.
72
73
Thus each fold's validation samples contribute to the shared encoding statistics; this is an intentional transductive choice rather than a fold-isolated preprocessing estimate.
Pass ``-m, --model <checkpoint.pth>`` to initialize a training run from either a minimal checkpoint or a full checkpoint.
76
+
Both forms load model weights. By default, a full checkpoint restores optimizer, epoch-scheduler, and warm-up-scheduler state together; a minimal checkpoint starts all three fresh.
77
+
Pass ``--restart-training-state`` with a full checkpoint to keep loading its model weights while starting fresh optimizer and scheduler state.
78
+
Before validation, XANESNET merges the checkpoint's ``dataset``, ``model``, and ``encodings`` signature sections into the training configuration.
79
+
Signature fields can be omitted to use the checkpoint values; explicitly supplied values must match exactly.
80
+
In particular, do not specify ``"auto"`` for a model or encoding field when using ``--model``.
81
+
Dataset settings not stored in the signature, such as ``root``, remain user-supplied.
82
+
For full checkpoints, optimizer and scheduler type settings are merged from the checkpoint along with their states unless ``--restart-training-state`` is set.
83
+
With that option, the optimizer and scheduler settings from YAML are used instead.
84
+
85
+
The configured ``trainer.epochs`` is the number of additional epochs for this invocation, not the total target epoch count.
86
+
To reuse the source run's exact split plan, set ``dataset.split_indexfile`` in the resume configuration to its ``split_indices.json``.
87
+
Multi-model runs also write ``split_indices_<index>.json`` files; to resume an individual member checkpoint, point ``split_indexfile`` to the matching single-plan file.
88
+
Remember: without a configured split file, the current configuration or strategy creates a new plan.
89
+
90
+
Stopper state and random-number-generator state are not restored.
91
+
Every invocation starts with fresh early-stopping and best-model bookkeeping and resumed training is not guaranteed to match an uninterrupted run bit for bit.
0 commit comments