declearn.utils.access_registered
Access a registered type by its name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Name under which the type is registered. |
required |
group |
Optional[str]
|
Name of the TypesRegistry under which the type is stored. If None, look for the name in each and every registry and return the first-found match or raise a KeyError. |
None
|
Returns:
Name | Type | Description |
---|---|---|
cls |
type
|
Type retrieved from a types registry. |
Raises:
Type | Description |
---|---|
KeyError
|
If no registered type matching the input parameters is found. |
Source code in declearn/utils/_register.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
|