update data display.
Browse filesSigned-off-by: lkk12014402 <kaokao.lv@intel.com>
Files changed (3)
607 unmodified lines60860961061161261361461561661761861962062162262362462521 unmodified lines64764864965065165265382 unmodified lines73673773873974074174274374474593 unmodified lines839840841842843844845846228 unmodified lines107510761077107810791080108110827 unmodified lines109010911092109310941095109610971098109911001101110211031104110511061107110811099 unmodified lines11191120112111221123112411251126112711281129113011311132113311341135113629 unmodified lines1166116711681169117011711172117320 unmodified lines119411951196119711981199120012011 unmodified line12031204120512061207120812091210121112121213121412151216332 unmodified lines1549155015511552155315541555155615571558155915601561607 unmodified lineshidden_df: pd.DataFrame,columns: list,pipeline_query: list,quant_status_query: list,eval_status_query: list,query: str,):filtered_df = hidden_df.copy()if pipeline_query:filtered_df = filtered_df[filtered_df["Pipeline"].isin(pipeline_query)]if quant_status_query:filtered_df = filtered_df[filtered_df["Quant Status"].isin(quant_status_query)]if eval_status_query:filtered_df = filtered_df[filtered_df["Eval Status"].isin(eval_status_query)]filtered_df = filter_auto_pipeline_queries(query, filtered_df)21 unmodified linesif len(temp_filtered_df) > 0:final_df.append(temp_filtered_df)if len(final_df) > 0:filtered_df = pd.concat(final_df).drop_duplicates(subset=["Result JSON"])else:filtered_df = filtered_df.iloc[0:0]82 unmodified lines)display_df["Download"] = display_df.apply(_make_dl_cell, axis=1)for col in ["Logs", "Sessions", "quantize.py"]:if col in display_df.columns:display_df[col] = display_df[col].map(lambda value: "yes" if value else "no")return display_df.fillna("")def show_modal():93 unmodified lines# ── Sidebar menu (uses gradio_sidebar_menu component) ────────────_menu_data = [{"type": "item", "id": "benchmark", "label": "LLM Benchmark", "icon": "trophy", "color": "#f59e0b"},{"type": "item", "id": "pipeline-results", "label": "Auto Pipeline Results", "icon": "folder-open", "color": "#0f766e"},{"type": "item", "id": "quant", "label": "Auto Quant", "icon": "rocket", "color": "#3b82f6"},{"type": "item", "id": "eval", "label": "Auto Eval", "icon": "flask-conical", "color": "#8b5cf6"},{"type": "item", "id": "metrics", "label": "Metrics", "icon": "bar-chart-3", "color": "#10b981"},228 unmodified lines# ── Page: Auto Pipeline Results ───────────────────────────────with gr.Column(visible=True, elem_id="page-pipeline-results") as page_pipeline_results:with gr.Accordion("Result Information", open=False, elem_classes=["submission-info-accordion"], elem_id="accordion-info-pipeline-results"):gr.Markdown(AUTO_PIPELINE_RESULTS_TEXT, elem_classes="markdown-text")auto_pipeline_all_df = auto_pipeline_results_df.copy()auto_pipeline_visible_choices = [7 unmodified linesif "Pipeline" in auto_pipeline_all_df.columnselse [])auto_pipeline_quant_status_choices = (sorted(auto_pipeline_all_df["Quant Status"].dropna().astype(str).unique().tolist())if "Quant Status" in auto_pipeline_all_df.columnselse [])auto_pipeline_eval_status_choices = (sorted(auto_pipeline_all_df["Eval Status"].dropna().astype(str).unique().tolist())if "Eval Status" in auto_pipeline_all_df.columnselse [])with gr.Row(elem_id="pipeline-search-row"):auto_pipeline_search_bar = gr.Textbox(placeholder="Search results (model, artifact, method, framework...) and press ENTER...",show_label=False,elem_id="pipeline-search-bar",scale=5,9 unmodified linesvalue=auto_pipeline_pipeline_choices,interactive=True,)auto_pipeline_quant_status_filter = gr.CheckboxGroup(label="Quant status",choices=auto_pipeline_quant_status_choices,value=auto_pipeline_quant_status_choices,interactive=True,)auto_pipeline_eval_status_filter = gr.CheckboxGroup(label="Eval status",choices=auto_pipeline_eval_status_choices,value=auto_pipeline_eval_status_choices,interactive=True,)with gr.Row():auto_pipeline_shown_columns = gr.CheckboxGroup(label="Visible columns",29 unmodified lineshidden_auto_pipeline_table,auto_pipeline_shown_columns,auto_pipeline_filter,auto_pipeline_quant_status_filter,auto_pipeline_eval_status_filter,auto_pipeline_search_bar,]20 unmodified linesfor selector in [auto_pipeline_shown_columns,auto_pipeline_filter,auto_pipeline_quant_status_filter,auto_pipeline_eval_status_filter,]:selector.change(filter_auto_pipeline_table,1 unmodified linehidden_auto_pipeline_table,auto_pipeline_shown_columns,auto_pipeline_filter,auto_pipeline_quant_status_filter,auto_pipeline_eval_status_filter,auto_pipeline_search_bar,],auto_pipeline_table,queue=True,)# ── Page: Auto Quant ─────────────────────────────────────────with gr.Column(visible=True, elem_id="page-quant", elem_classes=["page-hidden"]) as page_quant:with gr.Accordion("Submission Information", open=False, elem_classes=["submission-info-accordion"], elem_id="accordion-info-quant"):332 unmodified lines]},'pipeline-results': {title: 'Auto Pipeline Results',subtitle: 'Inspect auto_quant and auto_eval writebacks from lb_eval/results, including benchmark scores, GPU metadata and returned artifacts',badges: [{ icon: '🗂️', text: 'Aggregate Results' },{ icon: '📊', text: 'Piqa / MMLU / HellaSwag / GSM8K' },{ icon: '🧾', text: 'Logs / Sessions / quantize.py' },{ icon: '🤖', text: 'Agentic Auto Pipeline' }]},quant: {607 unmodified lines60860961061161261361461561661761861921 unmodified lines64164264364464564664782 unmodified lines73073173273373473593 unmodified lines829830831832833834835836228 unmodified lines1065106610671068106910707 unmodified lines10781079108010811082108310841085108610879 unmodified lines10971098109911001101110229 unmodified lines11321133113411351136113720 unmodified lines1158115911601161116211631 unmodified line116511661167116811691170117111721173117411751176117711781179332 unmodified lines1512151315141515151615171518151915201521152215231524607 unmodified lineshidden_df: pd.DataFrame,columns: list,pipeline_query: list,query: str,):filtered_df = hidden_df.copy()if pipeline_query:filtered_df = filtered_df[filtered_df["Pipeline"].isin(pipeline_query)]filtered_df = filter_auto_pipeline_queries(query, filtered_df)21 unmodified linesif len(temp_filtered_df) > 0:final_df.append(temp_filtered_df)if len(final_df) > 0:filtered_df = pd.concat(final_df).drop_duplicates()else:filtered_df = filtered_df.iloc[0:0]82 unmodified lines)display_df["Download"] = display_df.apply(_make_dl_cell, axis=1)return display_df.fillna("")def show_modal():93 unmodified lines# ── Sidebar menu (uses gradio_sidebar_menu component) ────────────_menu_data = [{"type": "item", "id": "pipeline-results", "label": "Benchmark for Quantized LLM", "icon": "bot", "color": "#0f766e"},{"type": "item", "id": "benchmark", "label": "LLM Benchmark", "icon": "trophy", "color": "#f59e0b"},{"type": "item", "id": "quant", "label": "Auto Quant", "icon": "rocket", "color": "#3b82f6"},{"type": "item", "id": "eval", "label": "Auto Eval", "icon": "flask-conical", "color": "#8b5cf6"},{"type": "item", "id": "metrics", "label": "Metrics", "icon": "bar-chart-3", "color": "#10b981"},228 unmodified lines# ── Page: Auto Pipeline Results ───────────────────────────────with gr.Column(visible=True, elem_id="page-pipeline-results") as page_pipeline_results:auto_pipeline_all_df = auto_pipeline_results_df.copy()auto_pipeline_visible_choices = [7 unmodified linesif "Pipeline" in auto_pipeline_all_df.columnselse [])with gr.Row(elem_id="pipeline-search-row"):auto_pipeline_search_bar = gr.Textbox(placeholder="Search by model name, scheme, or method … press ENTER",show_label=False,elem_id="pipeline-search-bar",scale=5,9 unmodified linesvalue=auto_pipeline_pipeline_choices,interactive=True,)with gr.Row():auto_pipeline_shown_columns = gr.CheckboxGroup(label="Visible columns",29 unmodified lineshidden_auto_pipeline_table,auto_pipeline_shown_columns,auto_pipeline_filter,auto_pipeline_search_bar,]20 unmodified linesfor selector in [auto_pipeline_shown_columns,auto_pipeline_filter,]:selector.change(filter_auto_pipeline_table,1 unmodified linehidden_auto_pipeline_table,auto_pipeline_shown_columns,auto_pipeline_filter,auto_pipeline_search_bar,],auto_pipeline_table,queue=True,)with gr.Accordion("About This Benchmark", open=False, elem_classes=["submission-info-accordion"], elem_id="accordion-info-pipeline-results"):gr.Markdown(AUTO_PIPELINE_RESULTS_TEXT, elem_classes="markdown-text")# ── Page: Auto Quant ─────────────────────────────────────────with gr.Column(visible=True, elem_id="page-quant", elem_classes=["page-hidden"]) as page_quant:with gr.Accordion("Submission Information", open=False, elem_classes=["submission-info-accordion"], elem_id="accordion-info-quant"):332 unmodified lines]},'pipeline-results': {title: 'Benchmark for Quantized LLM',subtitle: 'AI-driven quantization and evaluation — autonomous low-bit compression and benchmarking of open-source LLMs',badges: [{ icon: '🤖', text: 'Agentic AI Pipeline' },{ icon: '⚡', text: 'INT4 / MXFP4 / NVFP4' },{ icon: '📊', text: '4 Benchmark Tasks' },{ icon: '🏆', text: 'Open Source Models' }]},quant: {
216 unmodified lines217218219220221222223224225226227228229216 unmodified lines"""AUTO_PIPELINE_RESULTS_TEXT = """## 🗂️ Auto Pipeline ResultsBrowse the newest `auto_quant` and `auto_eval` runs written back to `lb_eval/results`.- **auto_quant** rows show the full quantize → upload → evaluate pipeline.- **auto_eval** rows show evaluation-only runs for already-quantized models.- The table includes benchmark scores, runtime metadata, and whether logs / sessions / `quantize.py` were written back."""CITATION_BUTTON_LABEL = ""216 unmodified lines217218219220221222223224225226227228229230231232233234235216 unmodified lines"""AUTO_PIPELINE_RESULTS_TEXT = """## 📊 Benchmark for Quantized LLMAn **AI-driven quantization and evaluation pipeline** that autonomously compresses open-source LLMs to low-bit precision and benchmarks them — no manual intervention required.### How it works1. **Submit** a full-precision model or an already-quantized model through the *Auto Quant* / *Auto Eval* pages.2. An **agentic orchestrator** provisions GPU resources, runs state-of-the-art quantization (INT4 / MXFP4 / NVFP4), and uploads the compressed artifact to HuggingFace Hub.3. The same pipeline **evaluates** the model on 4 standardized benchmarks (HellaSwag, MMLU, Piqa, GSM8K) and writes the scores back automatically.### What you see belowEach row represents one completed pipeline run — the quantized model, its benchmark scores across tasks, the quantization scheme and method used, and when it was generated. Only the **latest successful run per model** is shown; runs with any zero-accuracy task are automatically filtered out.> 💡 **Tip:** Use the search bar to filter by model name, scheme, or method. Toggle visible columns in *Filters & Columns*."""CITATION_BUTTON_LABEL = ""
16 unmodified lines171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273117 unmodified lines1911921931941951961971981992002012022032042052062072082092102112125 unmodified lines2182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652666 unmodified lines27327427527616 unmodified linesAUTO_PIPELINE_ALWAYS_VISIBLE_COLUMNS = ["Download", "Model", "Artifact"]AUTO_PIPELINE_TASK_SPECS = [(task.value.benchmark, task.value.col_name) for task in Tasks] + AUTO_PIPELINE_EXTRA_TASKSAUTO_PIPELINE_TASK_COLUMNS = [col_name for _, col_name in AUTO_PIPELINE_TASK_SPECS]AUTO_PIPELINE_ALL_COLUMNS = ["Download","Pipeline","Model","Artifact","Generated At","Average ⬆️",*AUTO_PIPELINE_TASK_COLUMNS,"Quant Status","Eval Status","Scheme","Method","Export Format","Eval Framework","Quant Secs","Eval Secs","Original MB","Quantized MB","Compression","Quant GPUs","Eval GPUs","GPUs","Logs","Sessions","quantize.py","Artifacts","Run Dir","Result JSON",]AUTO_PIPELINE_DEFAULT_COLUMNS = ["Pipeline","Generated At","Average ⬆️","Piqa","MMLU","HellaSwag","GSM8K","Quant Status","Eval Status","Scheme","Method","Eval Framework","Compression","Quant GPUs","Eval GPUs","GPUs","Logs","Sessions","quantize.py","Artifacts","Run Dir",]_TASK_ALIASES = {117 unmodified lineshas_quantize_script = any(path.endswith("quantize.py") or path.endswith("quantize_script.py") for path in all_artifact_paths)task_scores = _collect_task_scores(accuracy)valid_scores = [score for score in task_scores.values() if score is not None]average_score = round(sum(valid_scores) / len(valid_scores), 2) if valid_scores else Nonequant_num_gpus = data.get("quant_num_gpus") or quant_summary.get("quant_num_gpus") or quant_summary.get("num_gpus")eval_num_gpus = data.get("eval_num_gpus") or accuracy.get("eval_num_gpus") or accuracy.get("num_gpus")num_gpus = data.get("num_gpus") or accuracy.get("num_gpus") or quant_summary.get("num_gpus")if pipeline == "auto_quant":gpu_display = ", ".join(part for part in [f"q={quant_num_gpus}" if quant_num_gpus not in (None, "") else "",f"e={eval_num_gpus}" if eval_num_gpus not in (None, "") else "",] if part)else:gpu_display = str(num_gpus) if num_gpus not in (None, "") else Nonerelative_result_path = os.path.relpath(result_path, results_path)generated_at = data.get("generated_at")visible_model_text = model_id or artifact_namevisible_artifact_text = artifact_name5 unmodified linespipeline,visible_model_text,visible_artifact_text,str(data.get("run_dir") or ""),relative_result_path,str(quant_summary.get("scheme") or accuracy.get("scheme") or ""),str(quant_summary.get("method") or ""),str(accuracy.get("eval_framework") or ""),str(quant_num_gpus or ""),str(eval_num_gpus or ""),str(num_gpus or ""),],))row = {"Download": "","Pipeline": pipeline,"Model": _link_repo(model_id, model_id or artifact_name),"Artifact": _link_repo(artifact_repo, artifact_name),"Generated At": generated_at,"Average ⬆️": average_score,"Quant Status": quant_summary.get("status") or "missing","Eval Status": accuracy.get("status") or "missing","Scheme": quant_summary.get("scheme") or accuracy.get("scheme"),"Method": quant_summary.get("method"),"Export Format": quant_summary.get("export_format"),"Eval Framework": accuracy.get("eval_framework"),"Quant Secs": _safe_float(quant_summary.get("duration_seconds")),"Eval Secs": _safe_float(accuracy.get("duration_seconds")),"Original MB": _safe_float(quant_summary.get("original_size_mb")),"Quantized MB": _safe_float(quant_summary.get("quantized_size_mb")),"Compression": _safe_float(quant_summary.get("compression_ratio")),"Quant GPUs": quant_num_gpus,"Eval GPUs": eval_num_gpus,"GPUs": gpu_display,"Logs": has_logs,"Sessions": has_sessions,"quantize.py": has_quantize_script,"Artifacts": len(copied_files),"Run Dir": data.get("run_dir"),"Result JSON": relative_result_path,AUTO_PIPELINE_SEARCH_COL: search_text,AUTO_PIPELINE_SORT_COL: generated_at,}row.update({key: (value if value is not None else 0) for key, value in task_scores.items()})rows.append(row)if not rows:6 unmodified linesdf[AUTO_PIPELINE_SORT_COL] = df[AUTO_PIPELINE_SORT_COL].fillna("").astype(str)df = df.sort_values(by=AUTO_PIPELINE_SORT_COL, ascending=False, na_position="last").reset_index(drop=True)return df[AUTO_PIPELINE_ALL_COLUMNS + [AUTO_PIPELINE_SEARCH_COL, AUTO_PIPELINE_SORT_COL]]16 unmodified lines17181920212223242526272829303132333435363738394041424344117 unmodified lines1621631641651661671681691701711721731741751761771781791801815 unmodified lines1871881891901911921931941951961971981992002012022032042052062072082092102112122132142156 unmodified lines22222322422522622722822923023123223323423523616 unmodified linesAUTO_PIPELINE_ALWAYS_VISIBLE_COLUMNS = ["Download", "Model", "Artifact"]AUTO_PIPELINE_TASK_SPECS = [(task.value.benchmark, task.value.col_name) for task in Tasks] + AUTO_PIPELINE_EXTRA_TASKSAUTO_PIPELINE_TASK_COLUMNS = [col_name for _, col_name in AUTO_PIPELINE_TASK_SPECS]# Only include the 4 tasks actively evaluated by the pipelineAUTO_PIPELINE_ACTIVE_TASKS = ["HellaSwag", "MMLU", "Piqa", "GSM8K"]AUTO_PIPELINE_ALL_COLUMNS = ["Download","Model","Artifact","Average ⬆️",*AUTO_PIPELINE_ACTIVE_TASKS,"Scheme","Method","Pipeline","Generated At",]AUTO_PIPELINE_DEFAULT_COLUMNS = ["Average ⬆️",*AUTO_PIPELINE_ACTIVE_TASKS,"Scheme","Method","Pipeline","Generated At",]_TASK_ALIASES = {117 unmodified lineshas_quantize_script = any(path.endswith("quantize.py") or path.endswith("quantize_script.py") for path in all_artifact_paths)task_scores = _collect_task_scores(accuracy)# Skip rows with no evaluation results at allvalid_scores = [score for score in task_scores.values() if score is not None]if not valid_scores:logger.info("Skipping %s: no evaluated tasks", result_path)continue# Skip rows where any evaluated task scored exactly 0 (evaluation failure)if any(score is not None and score == 0.0 for score in task_scores.values()):logger.info("Skipping %s: task with acc=0 detected", result_path)continueaverage_score = round(sum(valid_scores) / len(valid_scores), 2)generated_at = data.get("generated_at")visible_model_text = model_id or artifact_namevisible_artifact_text = artifact_name5 unmodified linespipeline,visible_model_text,visible_artifact_text,str(quant_summary.get("scheme") or accuracy.get("scheme") or ""),str(quant_summary.get("method") or ""),],))# auto_eval doesn't produce a quantized artifact — clear Download & Artifactis_quant_pipeline = (pipeline == "auto_quant")row = {"_model_id": model_id,"Download": "","Pipeline": pipeline,"Model": _link_repo(model_id, model_id or artifact_name),"Artifact": _link_repo(artifact_repo, artifact_name) if is_quant_pipeline else "","Generated At": generated_at,"Average ⬆️": average_score,"Scheme": quant_summary.get("scheme") or accuracy.get("scheme"),"Method": quant_summary.get("method"),AUTO_PIPELINE_SEARCH_COL: search_text,AUTO_PIPELINE_SORT_COL: generated_at,}row.update(task_scores)rows.append(row)if not rows:6 unmodified linesdf[AUTO_PIPELINE_SORT_COL] = df[AUTO_PIPELINE_SORT_COL].fillna("").astype(str)df = df.sort_values(by=AUTO_PIPELINE_SORT_COL, ascending=False, na_position="last").reset_index(drop=True)# Filter out rows with too few evaluated tasks (incomplete runs)_min_tasks = 4_task_count = df[AUTO_PIPELINE_TASK_COLUMNS].notna().sum(axis=1)df = df[_task_count >= _min_tasks].reset_index(drop=True)# Deduplicate: keep only the latest result per model (by generated_at)if "_model_id" in df.columns:df = df.drop_duplicates(subset=["_model_id"], keep="first").reset_index(drop=True)df = df.drop(columns=["_model_id"])return df[AUTO_PIPELINE_ALL_COLUMNS + [AUTO_PIPELINE_SEARCH_COL, AUTO_PIPELINE_SORT_COL]]
app.py+12-49
src/display/about.py+11-5
src/leaderboard/read_auto_pipeline_results.py+39-79