You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR: NVIDIA/NeMo-Run#28 will change how checkpoint IO is handled. Roughly after the change, instead of relying on self.__io__ we will have to use a different mechanism to get at the metadata associated with a particular checkpoint. Now there will be a io.ckpt_context global variable that stores the captured hyper-parameters for a particular config object which we need to modify instead. The following provides some rough psuedo-code for how this might look:
@dataclassclassModelConfig(TransformerConfig):
other_ckpt:str="path/to/checkpoint"defconfigure_model(self, tokenizer):
other_settings=io.load(self.other_ckpt).model.configmy_cfg=io.ckpt_context.model.config# pointer to global config that will be savedforsettingindir(other_settings):
#1 update self with settings from othersetattr(self, setting, getattr(other_settings, setting))
# 2 update what will be saved (post init) with settings from othersetattr(my_cfg, setting, getattr(other_settings, setting))
model=init_model(self)
load_model_weights(model, self.other_ckpt)
returnmodel
The text was updated successfully, but these errors were encountered:
This PR: NVIDIA/NeMo-Run#28 will change how checkpoint IO is handled. Roughly after the change, instead of relying on
self.__io__
we will have to use a different mechanism to get at the metadata associated with a particular checkpoint. Now there will be aio.ckpt_context
global variable that stores the captured hyper-parameters for a particular config object which we need to modify instead. The following provides some rough psuedo-code for how this might look:The text was updated successfully, but these errors were encountered: