HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/instructlab.cpython-39.opt-1.pyc
a

\��h��@s2ddlZddlmZmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPlugin�	PluginOptc@sXeZdZdZdZdZdZdZdZe	dde
dd	�e	d
de
dd	�e	d
ddd�gZdd�ZdS)�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)Zai)r�ilab)r�	ilab-userz
cloud-userzuser that runs instructlab)�defaultZval_type�desc�
ilab-conf-dir�zinstructlab data directory�	get-cacheFz#Capture models and osci cached data)r	r
c	sd}d}d}d}d}��||�}��||�}��||�������d����d���|d���|d	�g�gd
�}gd�}	z��d�d
d}
Wnty�d}
Yn0�j|�d�|�d�g|
d��j��fdd�|	D�|
d��jdd�|D�|
d��j|d|
d���d��r(�j|�|
d���t	�j
����d�}zt�|�}Wn(t
�yx��d|�d��YdS0|�r|j}
��d��r���|
��d��}
��|
|������|
|������fdd�|	D���j��|
|�dd���d��r����|
|��dS)Nz/usr/share/instructlab/configz/opt/app-root/srcz.cache/instructlabz.config/instructlabz.local/share/instructlabz
taxonomy/.gitztaxonomy/.githubz*src/.local/share/instructlab/taxonomy/.gitz-src/.local/share/instructlab/taxonomy/.github)z
taxonomy diffz#taxonomy diff --taxonomy-base=emptyzsystem infoz
model listzconfig show)	�dataZ	generatedZtaxonomyZ
taxonomy_dataZchatlogsZcheckpointsZdatasetsZinternalZphasedzinstructlab*r�z/rhel_ai_config.yamlz/config.yaml)�	containercsg|]}���|��qS���	path_join��.0Zdata_dir)�cont_local_path�selfr�B/usr/lib/python3.9/site-packages/sos/report/plugins/instructlab.py�
<listcomp>gs�z%Instructlab.setup.<locals>.<listcomp>cSsg|]}d|���qS)zilab r)r�subrrrrl�T)�	recursiverr
rzUser "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 Instructlabrcsg|]}���|��qSrrr)�data_dirs_baserrrr�s�)r)rZadd_forbidden_pathZget_all_containers_by_regex�	ExceptionZ
add_copy_specZadd_cmd_outputZadd_dir_listingZ
get_optionZadd_container_logs�list�
containers�pwd�getpwnam�KeyErrorZ	_log_warn�pw_dir)rZcont_share_conf_pathZ
cont_opt_pathZ	cache_dirZ
config_dirZlocal_share_dirZcont_cache_pathZcont_config_pathZsubcmdsZ	data_dirsZilab_conZ	ilab_userZuser_pwdZilab_dirr)rrrr�setup)s��
���


�������

�
��
�
�zInstructlab.setupN)
�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesr Zcommandsr�strZoption_listr%rrrrrs"
����	r)r!Zsos.report.pluginsrrrrrrrr�<module>s