HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/instructlab.cpython-310.pyc
o

-�_g��@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)�ai)r�ilab)r�	ilab-userz
cloud-userzuser that runs instructlab)�default�val_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}
WntySd}
Ynw�j|�d�|�d�g|
d��j��fdd�|	D�|
d��jdd�|D�|
d��j|d|
d���d�r��j|�|
d���t	�j
����d�}zt�|�}Wnt
y���d|�d��YdSw|�r|j}
��d�rψ�|
��d��}
��|
|������|
|������fdd�|	D���j��|
|�dd���d��r	����|
|��dSdSdS)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)	�data�	generated�taxonomy�
taxonomy_data�chatlogs�checkpoints�datasets�internal�phasedzinstructlab*r�z/rhel_ai_config.yamlz/config.yaml)�	containerc�g|]}���|��qS���	path_join��.0�data_dir)�cont_local_path�selfr�@/usr/lib/python3/dist-packages/sos/report/plugins/instructlab.py�
<listcomp>gs�z%Instructlab.setup.<locals>.<listcomp>cSsg|]}d|���qS)zilab r)r �subrrr$r%lsT)�	recursiverrr	zUser "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
crrrr)�data_dirs_baser#rr$r%�s
��)r')r�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)r#�cont_share_conf_path�
cont_opt_path�	cache_dir�
config_dir�local_share_dir�cont_cache_path�cont_config_path�subcmds�	data_dirs�ilab_con�	ilab_user�user_pwd�ilab_dirr)r"r(r#r$�setup)s��
���

�������
�

��	

��
�
��zInstructlab.setupN)
�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profilesr2�commandsr�str�option_listrErrrr$rs$
����	r)r3�sos.report.pluginsrrrrrrrr$�<module>s