o
    }oi                     @   s   d dl mZ d dlZd dlmZmZ ejj		 			dde	de	d	e
d
ee
 de
deje fddZejj		dde
de
deje fddZdS )    )OptionalN)CosineAnnealingSchedulerPytorchOptimizerModule  h㈵>-C6?warmup_stepsconstant_stepsmax_lrmin_lrwdreturnc              	   C   s>   ddl m} tjttj|||dtjt| ||pd| ddS )Nr   SGDlrweight_decayg?)r   r	   r   )optimizer_fnlr_scheduler)torch.optimr   runConfigr   Partialr   )r   r	   r
   r   r   r    r   Z/home/ubuntu/.local/lib/python3.10/site-packages/nemo/collections/llm/recipes/optim/sgd.py!pytorch_sgd_with_cosine_annealing   s   
r   r   c                 C   s&   ddl m} tjttj|| |ddS )Nr   r   r   )r   )r   r   r   r   r   r   )r   r   r   r   r   r   pytorch_sgd_with_flat_lr0   s   r   )r   r   r   Nr   )r   r   )typingr   nemo_runr   nemo.lightning.pytorch.optimr   r   clifactoryintfloatr   r   r   r   r   r   r   <module>   s@   