|
| 1 | +# Included Configurations |
| 2 | + |
| 3 | +Hydra is organized around "configuration groups", which are collections of related configuration files. The reference training script is organized around several configuration groups which are intended to be used in routine experiments, as well as some others which should not generally need to be modified (`hydra`, `lightningmodule`). |
| 4 | + |
| 5 | +## `meta` — Metadata |
| 6 | + |
| 7 | +```sh |
| 8 | +uv run train.py meta.name=example_experiment meta.version=test_version_0 resume=path/to/previous/checkpoint.ckpt |
| 9 | +``` |
| 10 | + |
| 11 | +Experiment metadata is configured using the `meta` config group, including an optional `resume` field which can be used to resume training from a previous checkpoint (with identical model settings). |
| 12 | + |
| 13 | +!!! warning |
| 14 | + |
| 15 | + Make sure to set the `meta.name` and `meta.version` fields! |
| 16 | + |
| 17 | +## `size` — Model Dimensions |
| 18 | + |
| 19 | +```sh |
| 20 | +uv run train.py size.d_model=256 size.d_feedforward=1024 size.nhead=4 size.enc_layers=3 size.dec_layers=3 |
| 21 | +``` |
| 22 | + |
| 23 | +Certain model dimensions can be configured globally using a `size` config group, which is referenced by other model configurations: |
| 24 | + |
| 25 | +```yaml |
| 26 | +size: |
| 27 | + d_model: 512 |
| 28 | + d_feedforward: 2048 |
| 29 | + nhead: 8 |
| 30 | + enc_layers: 4 |
| 31 | + dec_layers: 4 |
| 32 | +``` |
| 33 | +
|
| 34 | +## `base` — Base Model |
| 35 | + |
| 36 | +```sh |
| 37 | +uv run train.py +base=occ3d_to_semseg |
| 38 | +``` |
| 39 | + |
| 40 | +Load a base model using the specified configuration; see [`NRDKLightningModule.load_weights`][nrdk.framework.NRDKLightningModule.load_weights] for details about how to configure this behavior. |
| 41 | + |
| 42 | +=== "Base → 2D Occupancy" |
| 43 | + |
| 44 | + ```sh |
| 45 | + --8<-- "grt/config/base/occ3d_to_occ2d.yaml" |
| 46 | + ``` |
| 47 | + |
| 48 | +=== "Base → Semseg" |
| 49 | + |
| 50 | + ```sh |
| 51 | + --8<-- "grt/config/base/occ3d_to_semseg.yaml" |
| 52 | + ``` |
| 53 | + |
| 54 | +=== "Base → Odometry" |
| 55 | + |
| 56 | + ```sh |
| 57 | + --8<-- "grt/config/base/occ3d_to_vel.yaml" |
| 58 | + ``` |
| 59 | + |
| 60 | +## `datamodule` — Dataloader |
| 61 | + |
| 62 | +To configure the sensors to load: |
| 63 | +```sh |
| 64 | +uv run train.py sensors@datamodule.dataset.sensors=[radar,lidar,semseg,pose] |
| 65 | +``` |
| 66 | + |
| 67 | +To configure which traces to include in the dataset: |
| 68 | +```sh |
| 69 | +uv run train.py traces@datamodule.traces=[bike,indoor,outdoor] |
| 70 | +``` |
| 71 | + |
| 72 | +See [`nrdk.roverd.datamodule`][nrdk.roverd.datamodule] for more details about the dataloader configuration. |
| 73 | + |
| 74 | +## `model` — Model Architecture |
| 75 | + |
| 76 | +```sh |
| 77 | +uv run train.py model=default |
| 78 | +uv run train.py model/decoder=semseg |
| 79 | +``` |
| 80 | + |
| 81 | +The model is just any `torch.nn.Module`; the included [`TokenizerEncoderDecoder`][nrdk.framework.TokenizerEncoderDecoder] is a good starting point. |
| 82 | + |
| 83 | +!!! warning |
| 84 | + |
| 85 | + The reference configs are built around [`TokenizerEncoderDecoder`][nrdk.framework.TokenizerEncoderDecoder], with the tokenizer, encoder, and decoder as nested sub-configs. |
| 86 | + |
| 87 | + Note that these sub-configs must be specified as `model/decoder=...`, not `model.decoder=...`! |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## `objective` — Training Objective |
| 92 | + |
| 93 | +```sh |
| 94 | +uv run train.py objective=lidar3d |
| 95 | +``` |
| 96 | + |
| 97 | +Training objectives are expected to implement the the [`Objective`][abstract_dataloader.ext.objective] interface. |
| 98 | + |
| 99 | +## `transforms` — Data Processing |
| 100 | + |
| 101 | +```sh |
| 102 | +uv run train.py transforms@transforms.sample=[radar,lidar3d] |
| 103 | +``` |
| 104 | + |
| 105 | +## `lightningmodule` — Training Loop |
| 106 | + |
| 107 | +The default `lightningmodule` config should not need to be modified, and pulls in the `${objective}` and `{$model}` configs. |
0 commit comments