nemo_automodel.training.base_recipe
#
Module Contents#
Classes#
BaseRecipe provides checkpoint load/save functionality for recipes. |
Functions#
Checks whether object has load_state_dict and state_dict functions. |
|
Find the latest checkpoint in the checkpoint directory and return it. |
API#
- nemo_automodel.training.base_recipe.has_load_restore_state(object)[source]#
Checks whether object has load_state_dict and state_dict functions.
TODO: also need to check function signatures.
- Parameters:
object (any) – the object to check.
- Returns:
returns True if has callable load_state_dict and state_dict
- Return type:
bool
- class nemo_automodel.training.base_recipe.BaseRecipe[source]#
BaseRecipe provides checkpoint load/save functionality for recipes.
- __setattr__(key, value)[source]#
Overriden setattr to keep track of stateful classes.
- Parameters:
key (str) – attribute named.
value (Any) – Value assigned
- Raises:
ValueError – if __state_tracked is attemped to be overwriten.