Ilab parsers

Parsers provided by this module include:

IlabModuleList - command /usr/bin/ilab model list

class insights.parsers.ilab.IlabModuleList(context, extra_bad_lines=None)[source]

Bases: CommandParser, list

This parser will parse the output of “/usr/bin/ilab model list”.

Sample output from /usr/bin/ilab model list:

+-----------------------------------+---------------------+---------+
| Model Name                        | Last Modified       | Size    |
+-----------------------------------+---------------------+---------+
| models/prometheus-8x7b-v2-0       | 2024-08-09 13:28:50 |  87.0 GB|
| models/mixtral-8x7b-instruct-v0-1 | 2024-08-09 13:28:24 |  87.0 GB|
| models/granite-7b-redhat-lab      | 2024-08-09 14:28:40 |  12.6 GB|
| models/granite-7b-starter         | 2024-08-09 14:40:35 |  12.6 GB|
+-----------------------------------+---------------------+---------+

Examples

>>> type(ilab_model_list_info)
<class 'insights.parsers.ilab.IlabModuleList'>
>>> ilab_model_list_info[0]["model_name"]
'models/prometheus-8x7b-v2-0'
models

list of model names

Type:

list

parse_content(content)[source]

This method must be implemented by classes based on this class.