
    -_g                     8    d dl Z d dlmZmZmZ  G d dee      Zy)    N)PluginIndependentPlugin	PluginOptc                   n    e Zd ZdZd ZdZdZdZdZ e	dde
d	       e	d
de
d	       e	ddd      gZd Zy)InstructlabaL  
    This plugin is used to capture information about
    Instructlab installations.
    InstructLab is an open source project for enhancing
    large language models (LLMs) used in generative
    artificial intelligence (gen AI) applications.
    Instructlab can run either as a container, or directly
    outside a container.
    instructlab)ai)r   ilab)r
   	ilab-userz
cloud-userzuser that runs instructlab)defaultval_typedescilab-conf-dir zinstructlab data directory	get-cacheFz#Capture models and osci cached data)r   r   c           	         d}d}d}d}d}| j                  ||      }| j                  ||      }| j                  ||      }| j                  | j                  |d      | j                  |d      | j                  |d      | j                  |d	      g       g d
}	g d}
	 | j                  d      d   d   }| j	                  | d| dg|       | j	                  |
D cg c]  }| j                  ||       c}|       | j                  |	D cg c]  }d| 	 c}|       | j                  |d|       | j                  d      r| j	                  | |       | j                  t        | j                               | j                  d      }	 t        j                  |      }|r|j                  }| j                  d      r!| j                  || j                  d            }| j                  ||      }| j	                  | j                  ||             | j	                  |
D cg c]  }| j                  ||       c}       | j                  | j                  ||      d       | j                  d      r"| j	                  | j                  ||             y y y # t        $ r d }Y w xY wc c}w c c}w # t        $ r | j                  d| d       Y y w xY wc c}w )Nz/usr/share/instructlab/configz/opt/app-root/srcz.cache/instructlabz.config/instructlabz.local/share/instructlabztaxonomy/.gitztaxonomy/.githubz*src/.local/share/instructlab/taxonomy/.gitz-src/.local/share/instructlab/taxonomy/.github)ztaxonomy diffz#taxonomy diff --taxonomy-base=emptyzsystem infoz
model listzconfig show)	data	generatedtaxonomytaxonomy_datachatlogscheckpointsdatasetsinternalphasedzinstructlab*r      z/rhel_ai_config.yamlz/config.yaml)	containerzilab T)	recursiver   r   r   zUser "z" does not exist, will not collect Instructlab information. Use `-k instructlab.ilab-user` option to define the user to use to collect data for Instructlabr   )r   )	path_joinadd_forbidden_pathget_all_containers_by_regex	Exceptionadd_copy_specadd_cmd_outputadd_dir_listing
get_optionadd_container_logslist
containerspwdgetpwnamKeyError	_log_warnpw_dir)selfcont_share_conf_pathcont_opt_path	cache_dir
config_dirlocal_share_dircont_cache_pathcont_config_pathcont_local_pathsubcmds	data_dirsilab_condata_dirsub	ilab_useruser_pwdilab_dirdata_dirs_bases                     @/usr/lib/python3/dist-packages/sos/report/plugins/instructlab.pysetupzInstructlab.setup)   s8   >+ )	 +
 5 ..	B>>-D..HNN?*,NN?,>?NN=GINN=JL!
 	


		77GJ1MH 	$%%9: !.0 	 	

 	&( ^^OX6 ( 	 	

 	&-.suSE]. 	 	
 	 	 	

 ??;'"#"   	T__ 56OOK0			||I.H H/>>dooo> "^^HoFNt~~h
CD )  ~x8     x3 ! 
 {+""NN8Y7 ,% S  	H	(
 /$  	NN $B BC
 	$ s6   J$  J6J;K  ,K$$J32J3 K! K!N)__name__
__module____qualname____doc__
short_descplugin_nameprofilesr)   commandsr   stroption_listrB        rA   r   r      sb     JKH)JH 	+|c3	5/23	5+u<	>KsrN   r   )r*   sos.report.pluginsr   r   r   r   rM   rN   rA   <module>rP      s!     C CM&+ MrN   