Input and Adapter Types
types
BatchParam
dataclass
Bases: Generic[_BatchT]
Explicit shared/separate wrapper for batch inputs.
Source code in src/mifrost/encoders/types.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
BatchEncodingLike
Bases: Protocol
Structural type for native C++ BatchEncoding-like objects.
Concrete bindings expose this shape from C++ while Python code can
type against the protocol without importing binding internals.
The protocol mirrors PyG-level structural metadata (graph/node/edge
counts and type lists) but intentionally does not model dynamic node
storage attributes like data["atom"].x.
Source code in src/mifrost/encoders/types.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |
HeteroEncoding
Bases: BatchEncodingLike, Protocol
Refined protocol for hetero native encodings.
Source code in src/mifrost/encoders/types.py
177 178 179 180 181 182 183 | |
HomoEncoding
Bases: BatchEncodingLike, Protocol
Refined protocol for homo native encodings.
Source code in src/mifrost/encoders/types.py
186 187 188 189 190 191 192 | |
FlatEncoding
Bases: BatchEncodingLike, Protocol
Refined protocol for flat native encodings.
Flat encodings use graph_kind == "flat" even though their tensor layout is
still homo-shaped and converts through the flat PyG carrier.
Source code in src/mifrost/encoders/types.py
195 196 197 198 199 200 201 202 203 204 205 206 | |
register_state_adapter(state_type, adapter)
Register a custom state adapter.
The adapter must return a pymimir.advanced.search.State instance.
Adapters are matched by exact concrete type.
Source code in src/mifrost/encoders/types.py
212 213 214 215 216 217 218 219 | |
unregister_state_adapter(state_type)
Remove a previously registered custom state adapter.
Source code in src/mifrost/encoders/types.py
222 223 224 | |
is_state_input(value)
Return whether value is accepted as a state input.
Source code in src/mifrost/encoders/types.py
231 232 233 | |
register_domain_adapter(domain_type, adapter)
Register a custom domain adapter matched by exact concrete type.
Source code in src/mifrost/encoders/types.py
236 237 238 | |
unregister_domain_adapter(domain_type)
Remove a previously registered custom domain adapter.
Source code in src/mifrost/encoders/types.py
241 242 243 | |
is_domain_input(value)
Return whether value is accepted as a domain input.
Source code in src/mifrost/encoders/types.py
250 251 252 | |
register_literal_adapter(literal_type, adapter)
Register a custom goal-literal adapter matched by exact concrete type.
Source code in src/mifrost/encoders/types.py
255 256 257 258 259 | |
unregister_literal_adapter(literal_type)
Remove a previously registered custom literal adapter.
Source code in src/mifrost/encoders/types.py
262 263 264 | |
is_goal_literal_input(value)
Return whether value is accepted as a goal literal input.
Source code in src/mifrost/encoders/types.py
271 272 273 274 275 276 | |
register_action_adapter(action_type, adapter)
Register a custom ground-action adapter matched by exact concrete type.
Source code in src/mifrost/encoders/types.py
279 280 281 | |
unregister_action_adapter(action_type)
Remove a previously registered custom action adapter.
Source code in src/mifrost/encoders/types.py
284 285 286 | |
is_action_input(value)
Return whether value is accepted as an action input.
Source code in src/mifrost/encoders/types.py
293 294 295 296 297 298 | |