@@ -80,6 +80,8 @@ def __init__(self, args):
80
80
self .browse_output = utils .browse_output .__get__ (self )
81
81
self .browse_logs = utils .browse_logs .__get__ (self )
82
82
self .browse_imatrix = utils .browse_imatrix .__get__ (self )
83
+ self .get_models_data = utils .get_models_data .__get__ (self )
84
+ self .get_tasks_data = utils .get_tasks_data .__get__ (self )
83
85
self .update_threads_spinbox = partial (ui_update .update_threads_spinbox , self )
84
86
self .update_threads_slider = partial (ui_update .update_threads_slider , self )
85
87
self .update_gpu_offload_spinbox = partial (
@@ -1549,38 +1551,6 @@ def browse_imatrix_output(self):
1549
1551
if output_file :
1550
1552
self .imatrix_output .setText (os .path .abspath (output_file ))
1551
1553
1552
- def get_models_data (self ):
1553
- models = []
1554
- root = self .model_tree .invisibleRootItem ()
1555
- child_count = root .childCount ()
1556
- for i in range (child_count ):
1557
- item = root .child (i )
1558
- model_name = item .text (0 )
1559
- model_type = "sharded" if "sharded" in model_name .lower () else "single"
1560
- model_path = item .data (0 , Qt .ItemDataRole .UserRole )
1561
- models .append ({"name" : model_name , "type" : model_type , "path" : model_path })
1562
- return models
1563
-
1564
- def get_tasks_data (self ):
1565
- tasks = []
1566
- for i in range (self .task_list .count ()):
1567
- item = self .task_list .item (i )
1568
- task_widget = self .task_list .itemWidget (item )
1569
- if task_widget :
1570
- tasks .append (
1571
- {
1572
- "name" : task_widget .task_name ,
1573
- "status" : task_widget .status ,
1574
- "progress" : (
1575
- task_widget .progress_bar .value ()
1576
- if hasattr (task_widget , "progress_bar" )
1577
- else 0
1578
- ),
1579
- "log_file" : task_widget .log_file ,
1580
- }
1581
- )
1582
- return tasks
1583
-
1584
1554
def generate_imatrix (self ):
1585
1555
self .logger .info (STARTING_IMATRIX_GENERATION )
1586
1556
try :
0 commit comments