
    Ki                     2    S r SSKrSSKrSSKrS rS rS rg)z9
Check OS requirements for ONNX Runtime Python Bindings.
    Nc                     Sn Sn[         R                  " 5       R                  5       nSnSnUS:X  aG  Un [         R                  " 5       R                  5       nUS;  a  [        R
                  " SU S35        g g US:X  a   [        R                  " US	5      S	S
 n [        R                  " US5      SS nU (       d4  [        R                  " US5      SS
 n [        R                  " US5      SS
 nU R                  5       n UR                  5       ng US:X  ab  Un [         R                  " 5       R                  5       n[        UR                  S5      S   5      S:  a  [        R
                  " SU S35        g g US:X  a,  SS K
nUR                  S5      nUR                  S5      nUS S	 ng [        R
                  " SU S35        g )N z/etc/os-releasez/etc/lsb-releasewindows)1011
2016server
2019server
2022server
2025serverzUnsupported Windows version (zP). ONNX Runtime supports Windows 10 and above, or Windows Server 2016 and above.linux                     darwin.r   zUnsupported macOS version (z-). ONNX Runtime supports macOS 11.0 or later.aixoslevelzutf-8zUnsupported platform (zG). ONNX Runtime supports Linux, macOS, AIX and Windows platforms, only.)platformsystemlowerreleasewarningswarn	linecachegetlineintsplit
subprocesscheck_outputdecode)	__my_distro____my_distro_ver____my_system____OS_RELEASE_FILE____LSB_RELEASE_FILE__r$   returned_output__my_distro_ver__str__my_distro_vers	            i/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_validation.pycheck_distro_infor0      s   MOO%++-M+-	!%$,,.446$hhMM/0A/B  CS  T i 
'	!	 "))*=qA!BG%--.A1EbL %--.BAFr"MM ) 1 12F J2b Q &++--335	(	"%$,,.446 &&s+A./"4MM-.?-@@mn 5 
%	$11)<.55g>.r2$]O3z{	
    c                      Sn SnSn SSK Jn  SSK Jn    SSK Jn  XU4$ ! [         a     Nf = f! [
         a+  n[        R                  " S5        [        U5         S nANDS nAff = f)Nr   r   )__version__)package_name)cuda_versionz8WARNING: failed to collect package name and version info)	build_and_package_infor3   r4   r5   ImportError	Exceptionr   r   print)r4   versionr5   es       r/   !get_package_name_and_version_infor<   G   sl    LGLB8	< ,..  		  PQas(   /  
,/ ,/ 
A$!AA$c                    ^^	^
^ S n Sn SSK Jn  Sn[        5       u  m
mmU(       ao  T(       ah    SSKJ	m	  UU	U
U4S	 jnSS
KJn  U" STS9nT	(       aC  U(       a<  T	U;  a6  U" 5         [        R                  " S5        [        R                  " SU 35        U (       a  U eUT
TT4$ ! [         a    Sn N[         a?  n SSKJn  [        X45      (       a  SnO! [         a    Sn Of = fU(       d  Un  S nANS nAff = f! [         a    [        R                  " S5        S m	 Nf = f! [         a+  n[        R                  " S5        [        U5         S nANS nAff = f)NFr   )	ORTModuleT)ORTModuleInitExceptionr   )cudart_versionzBWARNING: failed to get cudart_version from onnxruntime build info.c                     > [         R                  " ST 35        [         R                  " ST 35        [         R                  " ST  35        [         R                  " ST 35        g )Nz1onnxruntime training package info: package_name: z0onnxruntime training package info: __version__: z1onnxruntime training package info: cuda_version: z(onnxruntime build info: cudart_version: )r   r   )r5   r@   r4   r:   s   r/   print_build_package_info7check_training_module.<locals>.print_build_package_info   sZ     QR^Q_`a PQXPYZ[ QR^Q_`a HHXYZr1   )find_cudart_versions)	build_envbuild_cuda_versionzJWARNING: failed to find cudart version that matches onnxruntime build infoz WARNING: found cudart versions: z=WARNING: failed to collect onnxruntime version and build info)onnxruntime.training.ortmoduler>   r7   r8   (onnxruntime.training.ortmodule._fallbackr?   
isinstancer<   r6   r@   r   r   /onnxruntime.capi.onnxruntime_collect_build_inforD   r9   )import_ortmodule_exceptionhas_ortmoduler>   r;   r?   rB   rD   local_cudart_versionsr5   r@   r4   r:   s           @@@@r/   check_training_modulerN   \   sQ   !%M+<, +L*M'L'<	&B
[ [ ]$85]i$j!"7NRg<g(*jk @AV@WXY
 "((,==m   +	"W!44 $ 	"!M	" )*&+4  &bc!%&$  	MMYZ!HH	sp   B% C> A D& %C;3	C;=CC6C%"C6$C%%C66C;>"D# D& "D##D& &
E0!EE)__doc__r    r   r   r0   r<   rN    r1   r/   <module>rQ      s%   
   6
r/*>>r1   