o
    }oi                     @   sH   d dl mZmZ d dlmZ d dlmZ d dlmZ G dd deZ	dS )    )AnyMapping)SPEECHLM_PEFT_RESUME)MegatronStrategy)loggingc                       s4   e Zd Zddeeef deddf fddZ  ZS )	SpeechLMMegatronStrategyT
checkpointstrictreturnNc                    s<   | j }t|v rtd d}d| _ t j||d || _ dS )z
        Overwrite the load_model_state_dict method to skip loading PTL checkpoint in first stage of PEFT.
        This is needed to avoid
        zDResuming from PEFT jobs, skip PTL checkpoint loading in first stage.FN)r	   )ckpt_load_strictnessr   r   infosuperload_model_state_dict)selfr   r	   cached_ckpt_load_strictness	__class__ j/home/ubuntu/.local/lib/python3.10/site-packages/nemo/collections/speechlm/strategies/megatron_strategy.pyr      s   

z.SpeechLMMegatronStrategy.load_model_state_dict)T)	__name__
__module____qualname__r   strr   boolr   __classcell__r   r   r   r   r      s    ,r   N)
typingr   r   /nemo.collections.speechlm.utils.model_transformr   !nemo.lightning.pytorch.strategiesr   
nemo.utilsr   r   r   r   r   r   <module>   s
   