[docs]classGenerationModule(Stateful,metaclass=ABCMeta):@propertydefdp_process_group(self)->Optional[dist.ProcessGroup]:""" Should return the data parallel process group if it's anything other than the default process group. """returnNonedefstate_dict_to_load(self,metadata:Metadata)->Dict[str,Any]:delmetadatareturnself.state_dict()
[docs]@abstractmethoddefload_state_dict(self,state_dict:Dict[str,Any])->None:""" Load a state dict. """raiseNotImplementedError