o
G%@i @ s2 d dl Z d dlmZmZmZ G dd deeZdS ) N)PluginIndependentPlugin PluginOptc @ sX e Zd ZdZd ZdZdZdZdZe dde
dd e d
de
dd e d
dddgZdd ZdS )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)defaultval_typedesc
ilab-conf-dir zinstructlab data directory get-cacheFz#Capture models and osci cached data)r
r c s d}d}d}d}d} ||} ||} || d d |d |d g g d
}g d} zdd
d }
W n tyS d }
Y nw j| d| dg|
d j fdd| D |
d jdd |D |
d j|d|
d drj| |
d t j
d}zt|}W n t
y d| d Y d S w |r|j}
drψ |
d}
|
| |
| fdd| D j |
|dd dr |
| d S d S d S )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 generatedtaxonomy
taxonomy_datachatlogscheckpointsdatasetsinternalphasedzinstructlab*r z/rhel_ai_config.yamlz/config.yaml) containerc g | ]} |qS path_join.0data_dir)cont_local_pathselfr @/usr/lib/python3/dist-packages/sos/report/plugins/instructlab.py