
    9i                     N    d dl Z d dlZd dlmZ ddZd Zd Zedk(  r e        yy)    N)execute_subprocess_asyncc                     | | j                  d      }nt        j                  d      }|j                  dd d       | |j	                  t
               |S )NtestzAccelerate test commandz--config_fileaT  The path to use to store the config file. Will default to a file named default_config.yaml in the cache location, which is the content of the environment `HF_HOME` suffixed with 'accelerate', or if you don't have such an environment variable, your cache directory ('~/.cache' or the content of `XDG_CACHE_HOME`) suffixed with 'huggingface'.)defaulthelp)func)
add_parserargparseArgumentParseradd_argumentset_defaultstest_command)
subparsersparsers     b/var/www/html/backtest/airagagent/rag_env/lib/python3.12/site-packages/accelerate/commands/test.pytest_command_parserr      se    &&v.(()BC
"	  	 .M    c                    t         j                  j                  j                  t        j                  t         j                  j                        d d g dz         }| j                  |}nd| j                   d| }dg|j                         z   }t        |t         j                  j                               }|j                  dk(  rt        d       y y )	N)
test_utilsscriptsztest_script.pyz--config_file= zaccelerate-launch)envr   z?Test is a success! You are ready for your distributed training!)ospathsepjoin__file__splitconfig_filer   environcopy
returncodeprint)argsscript_name	test_argscmdresults        r   r   r   -   s    ''++""8>>"''++#>s#CFq#qrK	$T%5%5$6a}E	
)//"3
3C%crzz/@AFAOP r   c                  N    t               } | j                         }t        |       y N)r   
parse_argsr   )r   r%   s     r   mainr-   ;   s      "FDr   __main__r+   )r
   r   accelerate.test_utilsr   r   r   r-   __name__ r   r   <module>r2      s4   "  	 :,Q zF r   