Registry
create_register_decorator(registry)
Create a decorator that registers object of specified type (model, metric, ...)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
registry |
Dict[str, Callable]
|
Dict including registered objects (maps name to object that you register) |
required |
Returns:
Type | Description |
---|---|
Callable
|
Register function |
Source code in src/super_gradients/common/registry/registry.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
warn_if_deprecated(name, registry)
If the name is deprecated, warn the user about it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the object that we want to check if it is deprecated. |
required |
registry |
dict
|
The registry that may or may not include deprecated objects. |
required |
Source code in src/super_gradients/common/registry/registry.py
64 65 66 67 68 69 70 71 72 |
|