o
    ॵi                     @   s:   d dl Z d dlmZ dd Zdd Zedkre  dS dS )    N)build_trainerc                  C   sL   t jdd} | jddtd | jddtd d | jd	d
td d |  }|S )Nzevaluate a model)descriptionconfigzconfig file path)helptypez--trainer_namezname for trainer)r   r   defaultz--checkpoint_pathzcheckpoint to be evaluated)argparseArgumentParseradd_argumentstr
parse_args)parserargs r   I/home/ubuntu/.local/lib/python3.10/site-packages/modelscope/tools/eval.pyr      s   r   c                  C   s.   t  } t| jd}t| j|}|| j d S )N)cfg_file)r   dictr   r   trainer_nameevaluatecheckpoint_path)r   kwargstrainerr   r   r   main   s   r   __main__)r   modelscope.trainersr   r   r   __name__r   r   r   r   <module>   s   
