o
    ©Ì³i  ã                   @   s|   d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ G dd	„ d	ƒZd
d„ Zedkr<eƒ  dS dS )é    N)ÚCat)ÚCopy)ÚDownload)ÚList)ÚRun)ÚValidatec                   @   s<   e Zd ZdZdd„ Zdejfdd„Zdejddfd	d
„ZdS )ÚTuneCLIParserz0Holds all information related to running the CLIc                    sv   t jddddˆ _ˆ jj‡ fdd„d ˆ jjdd	}t |¡ t |¡ t |¡ t	 |¡ t
 |¡ t |¡ d S )
NÚtunezWelcome to the torchtune CLI!T)ÚprogÚdescriptionÚadd_helpc                    s
   ˆ j  ¡ S ©N)Ú_parserÚ
print_help)Úargs©Úself© úG/home/ubuntu/.local/lib/python3.10/site-packages/torchtune/_cli/tune.pyÚ<lambda>   s   
 z(TuneCLIParser.__init__.<locals>.<lambda>©ÚfuncÚsubcommands)Útitle)ÚargparseÚArgumentParserr   Úset_defaultsÚadd_subparsersr   Úcreater   r   r   r   r   )r   Ú
subparsersr   r   r   Ú__init__   s   ý




zTuneCLIParser.__init__Úreturnc                 C   s
   | j  ¡ S )zParse CLI arguments)r   Ú
parse_argsr   r   r   r   r"   (   s   
zTuneCLIParser.parse_argsr   Nc                 C   s   |  |¡ dS )zExecute CLINr   )r   r   r   r   r   Úrun,   s   zTuneCLIParser.run)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r    r   Ú	Namespacer"   r#   r   r   r   r   r      s
    r   c                  C   s   t ƒ } |  ¡ }|  |¡ d S r   )r   r"   r#   )Úparserr   r   r   r   Úmain1   s   r*   Ú__main__)r   Útorchtune._cli.catr   Útorchtune._cli.cpr   Útorchtune._cli.downloadr   Útorchtune._cli.lsr   Útorchtune._cli.runr   Útorchtune._cli.validater   r   r*   r$   r   r   r   r   Ú<module>   s   
ÿ