3
ܓi @ s2 d dl Z d dlmZmZmZ G dd deeZdS ) N)PluginIndependentPlugin PluginOptc @ sX e Zd ZdZd ZdZdZdZdZe dde
dde d d
e
dde dd
ddgZdd 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.
instructlabaiilabz ilab-userz
cloud-userzuser that runs instructlab)defaultZval_typedescz
ilab-conf-dir zinstructlab data directoryz get-cacheFz#Capture models and osci cached data)r r
c s* d}d}d}d}d}j ||}j ||}j || jj dj dj |dj |d g d
ddd
dg}dddddddddg } yjdd d }
W n tk
r d }
Y nX j| d| dg|
d j fdd| D |
d jd d |D |
d j|d!|
d" jd#r>j| |
d jt j
jd$}ytj|}W n( t
k
r jd%| d& d S X |r&|j}
jd'rj |
jd'}
j |
|jj |
| jfd(d| D jj |
|d!d) jd#r&jj |
| 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/.githubz
taxonomy diffz#taxonomy diff --taxonomy-base=emptyzsystem infoz
model listzconfig showdataZ generatedZtaxonomyZ
taxonomy_dataZchatlogsZcheckpointsZdatasetsZinternalZphasedzinstructlab*r z/rhel_ai_config.yamlz/config.yaml) containerc s g | ]}j |qS ) path_join).0data_dir)cont_local_pathselfr !/usr/lib/python3.6/instructlab.py