|
| 1 | +# Snapshot Bindings Registry |
| 2 | + |
| 3 | +Snapshot bindings registry defines which snapshot of each specified dataset |
| 4 | +and feature set will be used by a script that uses these configs. |
| 5 | + |
| 6 | +It allows the use of specific snapshots, hence enabling reproducibility. |
| 7 | + |
| 8 | +Unlike some of the other configuration types, snapshot bindings are **centralized in a single configuration file** and selected dynamically at runtime of a given pipeline (likely `freeze.py`, |
| 9 | +`search.py`, or `train.py`). |
| 10 | + |
| 11 | +## 1. Location |
| 12 | + |
| 13 | +Snapshot bindings are defined in a single file: |
| 14 | + |
| 15 | +```text |
| 16 | +configs/snapshot_bindings_registry/bindings.yaml |
| 17 | +``` |
| 18 | + |
| 19 | +This file contains all of the defined **snapshots of snapshot bindings**. |
| 20 | + |
| 21 | +## 2. Configuration Structure |
| 22 | + |
| 23 | +The configuration is organized hierarchically |
| 24 | + |
| 25 | +General structure: |
| 26 | + |
| 27 | +```text |
| 28 | +snapshot_id |
| 29 | + └─ snapshot_bindings |
| 30 | +``` |
| 31 | + |
| 32 | +Example: |
| 33 | + |
| 34 | +```yaml |
| 35 | +2026-03-20T02-54-47_61509023: |
| 36 | + datasets: |
| 37 | + hotel_bookings: |
| 38 | + v1: |
| 39 | + snapshot: 2026-03-17T03-26-25_4e817323 |
| 40 | + v2: |
| 41 | + snapshot: 2026-03-17T03-26-27_c04ca84b |
| 42 | + feature_sets: |
| 43 | + booking_context_features: |
| 44 | + v1: |
| 45 | + snapshot: 2026-03-17T06-41-04_530962ff |
| 46 | + v2: |
| 47 | + snapshot: 2026-03-17T04-27-05_b9099899 |
| 48 | + v3: |
| 49 | + snapshot: 2026-03-17T04-27-07_6ecc2061 |
| 50 | + v4: |
| 51 | + snapshot: 2026-03-17T04-27-08_e45a7462 |
| 52 | + v5: |
| 53 | + snapshot: 2026-03-17T04-27-09_72290e7c |
| 54 | + v6: |
| 55 | + snapshot: 2026-03-17T04-27-10_f299b9d2 |
| 56 | + v7: |
| 57 | + snapshot: 2026-03-17T04-27-12_eba7203e |
| 58 | + channel_and_agent_features: |
| 59 | + v1: |
| 60 | + snapshot: 2026-03-17T04-27-24_d2b1a0df |
| 61 | + v2: |
| 62 | + snapshot: 2026-03-17T04-27-25_1bd99237 |
| 63 | + v3: |
| 64 | + snapshot: 2026-03-17T04-27-27_e73d2e8c |
| 65 | + customer_history_features: |
| 66 | + v1: |
| 67 | + snapshot: 2026-03-17T04-27-13_47665433 |
| 68 | + v2: |
| 69 | + snapshot: 2026-03-17T04-27-14_1881a909 |
| 70 | + v3: |
| 71 | + snapshot: 2026-03-17T04-27-15_c7be8caf |
| 72 | + v4: |
| 73 | + snapshot: 2026-03-17T04-27-17_1c0339c3 |
| 74 | + pricing_party_features: |
| 75 | + v1: |
| 76 | + snapshot: 2026-03-17T04-27-18_2e72ae25 |
| 77 | + v2: |
| 78 | + snapshot: 2026-03-17T04-27-19_dd815223 |
| 79 | + v3: |
| 80 | + snapshot: 2026-03-17T04-27-20_0592cbb0 |
| 81 | + v4: |
| 82 | + snapshot: 2026-03-17T04-27-21_c2f019fb |
| 83 | + v5: |
| 84 | + snapshot: 2026-03-17T04-27-23_8ef8fcc4 |
| 85 | + room_allocation_features: |
| 86 | + v1: |
| 87 | + snapshot: 2026-03-17T04-27-28_0368fd56 |
| 88 | + v2: |
| 89 | + snapshot: 2026-03-17T04-27-29_e07095bc |
| 90 | +``` |
| 91 | +
|
| 92 | +Required snapshots are selected based on snapshot id at runtime. Extra dataset and feature set snapshots do not break the execution. Missing ones do. |
| 93 | +
|
| 94 | +## 3. Fields |
| 95 | +
|
| 96 | +### Dataset Snapshot Bindings |
| 97 | +
|
| 98 | +Dataset snapshot bindings follow the following nesting policy: |
| 99 | +
|
| 100 | +```text |
| 101 | +datasets: |
| 102 | + └─ {dataset_name} |
| 103 | + └─ {dataset_version} |
| 104 | + └─ snapshot_information |
| 105 | +``` |
| 106 | +
|
| 107 | +Each nested layer specifies which snapshot should be used. |
| 108 | +
|
| 109 | +Example: |
| 110 | +
|
| 111 | +```yaml |
| 112 | +datasets: |
| 113 | +hotel_bookings: |
| 114 | + v1: |
| 115 | + snapshot: 2026-03-17T03-26-25_4e817323 |
| 116 | + v2: |
| 117 | + snapshot: 2026-03-17T03-26-27_c04ca84b |
| 118 | +``` |
| 119 | +
|
| 120 | +### Feature Set Snapshot Bindings |
| 121 | +
|
| 122 | +Feature set snapshot bindings follow the following nesting policy: |
| 123 | +
|
| 124 | +```text |
| 125 | +feature_sets: |
| 126 | + └─ {feature_set_name} |
| 127 | + └─ {feature_set_version} |
| 128 | + └─ snapshot_information |
| 129 | +``` |
| 130 | +
|
| 131 | +Each nested layer specifies which snapshot should be used. |
| 132 | +
|
| 133 | +Example: |
| 134 | +
|
| 135 | +```yaml |
| 136 | +feature_sets: |
| 137 | + booking_context_features: |
| 138 | + v1: |
| 139 | + snapshot: 2026-03-17T06-41-04_530962ff |
| 140 | + v2: |
| 141 | + snapshot: 2026-03-17T04-27-05_b9099899 |
| 142 | + v3: |
| 143 | + snapshot: 2026-03-17T04-27-07_6ecc2061 |
| 144 | + v4: |
| 145 | + snapshot: 2026-03-17T04-27-08_e45a7462 |
| 146 | + v5: |
| 147 | + snapshot: 2026-03-17T04-27-09_72290e7c |
| 148 | + v6: |
| 149 | + snapshot: 2026-03-17T04-27-10_f299b9d2 |
| 150 | + v7: |
| 151 | + snapshot: 2026-03-17T04-27-12_eba7203e |
| 152 | + channel_and_agent_features: |
| 153 | + v1: |
| 154 | + snapshot: 2026-03-17T04-27-24_d2b1a0df |
| 155 | + v2: |
| 156 | + snapshot: 2026-03-17T04-27-25_1bd99237 |
| 157 | + v3: |
| 158 | + snapshot: 2026-03-17T04-27-27_e73d2e8c |
| 159 | +``` |
| 160 | +
|
| 161 | +## 4. Validation |
| 162 | +
|
| 163 | +Snapshot bindings are validated using the `validate_snapshot_binding_registry` and |
| 164 | +`validate_snapshot_binding` functions. |
| 165 | + |
| 166 | +Validation ensures: |
| 167 | +- the config file is formatted properly |
| 168 | +- snapshot is not empty |
| 169 | +- snapshot contains dataset or feature set bindings, if required |
| 170 | + |
| 171 | +Invalid configurations raise a `ConfigError`. |
0 commit comments