Spaces:
Sleeping
Sleeping
update
Browse files- app.py +191 -26
- ci_id.txt +1 -0
- fetch_ci_results.py +120 -0
- test_results_by_type.csv +45 -39
app.py
CHANGED
|
@@ -1,47 +1,169 @@
|
|
| 1 |
import pandas as pd
|
| 2 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
-
# Load the CSV file
|
| 5 |
-
model_test_results = pd.read_csv('test_results_by_type.csv')
|
| 6 |
-
# Get models with failed tests and their failure counts
|
| 7 |
-
failed_models_counts = model_test_results[
|
| 8 |
-
(model_test_results['test_type'] == 'failed') &
|
| 9 |
-
(model_test_results['number_of_tests'] > 0)
|
| 10 |
-
].groupby('model')['number_of_tests'].first().to_dict()
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
# Concatenate the dataframes
|
| 23 |
-
model_test_results = pd.concat([failed_tests, other_tests])
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
# Create the Gradio interface
|
| 27 |
-
with gr.Blocks() as test_results_viz:
|
| 28 |
-
gr.Markdown("# Test Results by Model")
|
| 29 |
-
|
| 30 |
# Sort models by success/failure and number of failed tests
|
| 31 |
model_order = model_test_results.sort_values(
|
| 32 |
by=['conclusion', 'test_type', 'number_of_tests'],
|
| 33 |
ascending=[True, False, False]
|
| 34 |
)['model'].unique().tolist()
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
| 38 |
model_test_results,
|
| 39 |
x="model",
|
| 40 |
y="number_of_tests", # Base layer
|
| 41 |
color="test_type", # Color by pass/fail status
|
| 42 |
color_map={"passed": "#008550", "skipped": "#F0B702", "failed": "#8B1710"},
|
| 43 |
title="Test Results by Model",
|
| 44 |
-
x_title="
|
| 45 |
y_title="Number of Tests",
|
| 46 |
height=600,
|
| 47 |
width=1000,
|
|
@@ -49,5 +171,48 @@ with gr.Blocks() as test_results_viz:
|
|
| 49 |
x_order=model_order # Set custom order of x-axis
|
| 50 |
)
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
if __name__ == "__main__":
|
| 53 |
-
|
|
|
|
| 1 |
import pandas as pd
|
| 2 |
import gradio as gr
|
| 3 |
+
import requests
|
| 4 |
+
import yaml
|
| 5 |
+
import os
|
| 6 |
+
import re
|
| 7 |
+
import asyncio
|
| 8 |
+
import aiohttp
|
| 9 |
+
import pandas as pd
|
| 10 |
+
from tqdm import tqdm
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
def get_audio_models():
|
| 14 |
+
url = "https://raw.githubusercontent.com/huggingface/transformers/main/docs/source/en/_toctree.yml"
|
| 15 |
+
response = requests.get(url)
|
| 16 |
+
|
| 17 |
+
if response.status_code != 200:
|
| 18 |
+
print("Failed to fetch the YAML file")
|
| 19 |
+
return []
|
| 20 |
|
| 21 |
+
toctree_content = yaml.safe_load(response.text)
|
| 22 |
+
|
| 23 |
+
for section in toctree_content:
|
| 24 |
+
if section.get('title') == 'API':
|
| 25 |
+
for subsection in section.get('sections', []):
|
| 26 |
+
if subsection.get('title') == 'Models':
|
| 27 |
+
for model_section in subsection.get('sections', []):
|
| 28 |
+
if model_section.get('title') == 'Audio models':
|
| 29 |
+
return [audio_model.get('local').split('/')[-1].lower().replace('-', '_') for audio_model in model_section.get('sections', []) if 'local' in audio_model]
|
| 30 |
+
|
| 31 |
+
return []
|
| 32 |
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
def fetch_and_process_ci_results(job_id):
|
| 35 |
+
github_token = os.environ.get('GITHUB_TOKEN')
|
| 36 |
+
if not github_token:
|
| 37 |
+
raise ValueError("GitHub token not found in environment variables")
|
| 38 |
+
|
| 39 |
+
headers = {
|
| 40 |
+
"Authorization": f"token {github_token}",
|
| 41 |
+
"Accept": "application/vnd.github+json"
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
audio_models = get_audio_models()
|
| 45 |
+
non_tested_models = [
|
| 46 |
+
"xls_r",
|
| 47 |
+
"speech_to_text_2",
|
| 48 |
+
"mctct",
|
| 49 |
+
"xlsr_wav2vec2",
|
| 50 |
+
"mms"
|
| 51 |
+
]
|
| 52 |
+
|
| 53 |
+
url = f"https://api.github.com/repos/huggingface/transformers/actions/runs/{job_id}/jobs"
|
| 54 |
+
|
| 55 |
+
audio_model_jobs = {audio_model: [] for audio_model in audio_models}
|
| 56 |
+
|
| 57 |
+
def process_jobs(jobs_data):
|
| 58 |
+
for job in jobs_data['jobs']:
|
| 59 |
+
if "Model CI" in job['name'] and "models" in job['name']:
|
| 60 |
+
match = re.search(r'models/([^/)]+)', job['name'])
|
| 61 |
+
if match:
|
| 62 |
+
model_name = match.group(1).lower()
|
| 63 |
+
if model_name in audio_model_jobs:
|
| 64 |
+
audio_model_jobs[model_name].append(job['id'])
|
| 65 |
+
|
| 66 |
+
async def fetch_and_process_jobs(session, url):
|
| 67 |
+
async with session.get(url, headers=headers) as response:
|
| 68 |
+
jobs_data = await response.json()
|
| 69 |
+
process_jobs(jobs_data)
|
| 70 |
+
return response.links.get('next', {}).get('url')
|
| 71 |
+
|
| 72 |
+
async def fetch_all_jobs():
|
| 73 |
+
async with aiohttp.ClientSession() as session:
|
| 74 |
+
next_url = url
|
| 75 |
+
with tqdm(desc="Fetching jobs", unit="page") as pbar:
|
| 76 |
+
while next_url:
|
| 77 |
+
next_url = await fetch_and_process_jobs(session, next_url)
|
| 78 |
+
pbar.update(1)
|
| 79 |
+
|
| 80 |
+
def parse_test_results(text):
|
| 81 |
+
pattern = r'=+ (?:(\d+) failed,?\s*)?(?:(\d+) passed,?\s*)?(?:(\d+) skipped,?\s*)?(?:\d+ warnings?\s*)?in \d+\.\d+s'
|
| 82 |
+
match = re.search(pattern, text)
|
| 83 |
+
if match:
|
| 84 |
+
failed = int(match.group(1)) if match.group(1) else 0
|
| 85 |
+
passed = int(match.group(2)) if match.group(2) else 0
|
| 86 |
+
skipped = int(match.group(3)) if match.group(3) else 0
|
| 87 |
+
return {'failed': failed, 'passed': passed, 'skipped': skipped}
|
| 88 |
+
raise Exception("Could not find test summary in logs")
|
| 89 |
+
|
| 90 |
+
def retrieve_job_logs(job_id, job_name):
|
| 91 |
+
url = f"https://api.github.com/repos/huggingface/transformers/actions/jobs/{job_id}"
|
| 92 |
+
response = requests.get(url, headers=headers)
|
| 93 |
+
logs_url = f"https://api.github.com/repos/huggingface/transformers/actions/jobs/{job_id}/logs"
|
| 94 |
+
logs_response = requests.get(logs_url, headers=headers)
|
| 95 |
+
logs = logs_response.text
|
| 96 |
+
test_summary = parse_test_results(logs)
|
| 97 |
+
test_summary["model"] = job_name
|
| 98 |
+
test_summary["conclusion"] = response.json()['conclusion']
|
| 99 |
+
return test_summary
|
| 100 |
+
|
| 101 |
+
# Fetch initial jobs and run asynchronous job fetching
|
| 102 |
+
response = requests.get(url, headers=headers)
|
| 103 |
+
jobs = response.json()
|
| 104 |
+
process_jobs(jobs)
|
| 105 |
+
asyncio.run(fetch_all_jobs())
|
| 106 |
+
|
| 107 |
+
# Retrieve job logs and process results
|
| 108 |
+
results = []
|
| 109 |
+
for job_name, job_ids in tqdm(audio_model_jobs.items()):
|
| 110 |
+
for job_id in job_ids:
|
| 111 |
+
result = retrieve_job_logs(job_id, job_name)
|
| 112 |
+
results.append(result)
|
| 113 |
+
|
| 114 |
+
# Process results into DataFrame and save to CSV
|
| 115 |
+
df = (pd.DataFrame(results)
|
| 116 |
+
.melt(id_vars=['model', 'conclusion'],
|
| 117 |
+
value_vars=['failed', 'passed', 'skipped'],
|
| 118 |
+
var_name='test_type',
|
| 119 |
+
value_name='number_of_tests')
|
| 120 |
+
.groupby(['model', 'conclusion', 'test_type'])
|
| 121 |
+
.agg({'number_of_tests': 'sum'})
|
| 122 |
+
.reset_index())
|
| 123 |
+
|
| 124 |
+
df.to_csv('test_results_by_type.csv', index=False)
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def load_and_process_data():
|
| 128 |
+
# Load the CSV file
|
| 129 |
+
model_test_results = pd.read_csv('test_results_by_type.csv')
|
| 130 |
+
# Get models with failed tests and their failure counts
|
| 131 |
+
failed_models_counts = model_test_results[
|
| 132 |
+
(model_test_results['test_type'] == 'failed') &
|
| 133 |
+
(model_test_results['number_of_tests'] > 0)
|
| 134 |
+
].groupby('model')['number_of_tests'].first().to_dict()
|
| 135 |
+
|
| 136 |
+
# Add ❌ and failure count to model names that have failures, ✅ for passing models
|
| 137 |
+
model_test_results['model'] = model_test_results.apply(
|
| 138 |
+
lambda row: f"{row['model']} ❌ ({failed_models_counts[row['model']]})" if row['model'] in failed_models_counts else f"{row['model']} ✅",
|
| 139 |
+
axis=1
|
| 140 |
+
)
|
| 141 |
+
|
| 142 |
+
# Separate failed tests and other tests
|
| 143 |
+
failed_tests = model_test_results[model_test_results['test_type'] == 'failed'].sort_values('number_of_tests', ascending=False)
|
| 144 |
+
other_tests = model_test_results[model_test_results['test_type'] != 'failed']
|
| 145 |
+
|
| 146 |
+
# Concatenate the dataframes
|
| 147 |
+
model_test_results = pd.concat([failed_tests, other_tests])
|
| 148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
# Sort models by success/failure and number of failed tests
|
| 150 |
model_order = model_test_results.sort_values(
|
| 151 |
by=['conclusion', 'test_type', 'number_of_tests'],
|
| 152 |
ascending=[True, False, False]
|
| 153 |
)['model'].unique().tolist()
|
| 154 |
+
|
| 155 |
+
return model_test_results, model_order, failed_models_counts
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
def create_bar_plot(model_test_results, model_order, failed_models_counts):
|
| 159 |
+
return gr.BarPlot(
|
| 160 |
model_test_results,
|
| 161 |
x="model",
|
| 162 |
y="number_of_tests", # Base layer
|
| 163 |
color="test_type", # Color by pass/fail status
|
| 164 |
color_map={"passed": "#008550", "skipped": "#F0B702", "failed": "#8B1710"},
|
| 165 |
title="Test Results by Model",
|
| 166 |
+
x_title=f"Models ({len(failed_models_counts)} failing / {len(model_order)} total)",
|
| 167 |
y_title="Number of Tests",
|
| 168 |
height=600,
|
| 169 |
width=1000,
|
|
|
|
| 171 |
x_order=model_order # Set custom order of x-axis
|
| 172 |
)
|
| 173 |
|
| 174 |
+
|
| 175 |
+
# Create the Gradio interface
|
| 176 |
+
with gr.Blocks() as results_viz:
|
| 177 |
+
gr.Markdown("# Test Results by Model")
|
| 178 |
+
|
| 179 |
+
model_test_results, model_order, failed_models_counts = load_and_process_data()
|
| 180 |
+
test_results_plot = create_bar_plot(model_test_results, model_order, failed_models_counts)
|
| 181 |
+
|
| 182 |
+
with gr.Row():
|
| 183 |
+
refresh_btn = gr.Button(
|
| 184 |
+
value="Refresh CI Results (~2mn)",
|
| 185 |
+
variant="primary"
|
| 186 |
+
)
|
| 187 |
+
refresh_status = gr.Textbox()
|
| 188 |
+
|
| 189 |
+
def check_and_refresh():
|
| 190 |
+
# For now just return hardcoded ID
|
| 191 |
+
latest_ci_id = "15549432276"
|
| 192 |
+
|
| 193 |
+
try:
|
| 194 |
+
with open("ci_id.txt", "r") as f:
|
| 195 |
+
current_ci_id = f.read().strip()
|
| 196 |
+
except FileNotFoundError:
|
| 197 |
+
current_ci_id = ""
|
| 198 |
+
|
| 199 |
+
if latest_ci_id == current_ci_id:
|
| 200 |
+
return "No new CI results available yet.", test_results_plot
|
| 201 |
+
else:
|
| 202 |
+
fetch_and_process_ci_results(latest_ci_id)
|
| 203 |
+
with open("ci_id.txt", "w") as f:
|
| 204 |
+
f.write(latest_ci_id)
|
| 205 |
+
|
| 206 |
+
# Reload and reprocess the data
|
| 207 |
+
new_model_test_results, new_model_order, new_failed_models_counts = load_and_process_data()
|
| 208 |
+
|
| 209 |
+
# Create a new BarPlot with the updated data
|
| 210 |
+
new_test_results_plot = create_bar_plot(new_model_test_results, new_model_order, new_failed_models_counts)
|
| 211 |
+
|
| 212 |
+
return "CI results refreshed successfully!", new_test_results_plot
|
| 213 |
+
|
| 214 |
+
refresh_btn.click(fn=check_and_refresh, outputs=[refresh_status, test_results_plot])
|
| 215 |
+
|
| 216 |
+
|
| 217 |
if __name__ == "__main__":
|
| 218 |
+
results_viz.launch()
|
ci_id.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
15549432276
|
fetch_ci_results.py
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import yaml
|
| 3 |
+
import os
|
| 4 |
+
import re
|
| 5 |
+
import asyncio
|
| 6 |
+
import aiohttp
|
| 7 |
+
import pandas as pd
|
| 8 |
+
from tqdm import tqdm
|
| 9 |
+
|
| 10 |
+
def get_audio_models():
|
| 11 |
+
url = "https://raw.githubusercontent.com/huggingface/transformers/main/docs/source/en/_toctree.yml"
|
| 12 |
+
response = requests.get(url)
|
| 13 |
+
|
| 14 |
+
if response.status_code != 200:
|
| 15 |
+
print("Failed to fetch the YAML file")
|
| 16 |
+
return []
|
| 17 |
+
|
| 18 |
+
toctree_content = yaml.safe_load(response.text)
|
| 19 |
+
|
| 20 |
+
for section in toctree_content:
|
| 21 |
+
if section.get('title') == 'API':
|
| 22 |
+
for subsection in section.get('sections', []):
|
| 23 |
+
if subsection.get('title') == 'Models':
|
| 24 |
+
for model_section in subsection.get('sections', []):
|
| 25 |
+
if model_section.get('title') == 'Audio models':
|
| 26 |
+
return [audio_model.get('local').split('/')[-1].lower().replace('-', '_') for audio_model in model_section.get('sections', []) if 'local' in audio_model]
|
| 27 |
+
|
| 28 |
+
return []
|
| 29 |
+
|
| 30 |
+
def fetch_and_process_ci_results(job_id):
|
| 31 |
+
github_token = os.environ.get('GITHUB_TOKEN')
|
| 32 |
+
if not github_token:
|
| 33 |
+
raise ValueError("GitHub token not found in environment variables")
|
| 34 |
+
|
| 35 |
+
headers = {
|
| 36 |
+
"Authorization": f"token {github_token}",
|
| 37 |
+
"Accept": "application/vnd.github+json"
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
audio_models = get_audio_models()
|
| 41 |
+
non_tested_models = [
|
| 42 |
+
"xls_r",
|
| 43 |
+
"speech_to_text_2",
|
| 44 |
+
"mctct",
|
| 45 |
+
"xlsr_wav2vec2",
|
| 46 |
+
"mms"
|
| 47 |
+
]
|
| 48 |
+
|
| 49 |
+
url = f"https://api.github.com/repos/huggingface/transformers/actions/runs/{job_id}/jobs"
|
| 50 |
+
|
| 51 |
+
audio_model_jobs = {audio_model: [] for audio_model in audio_models}
|
| 52 |
+
|
| 53 |
+
def process_jobs(jobs_data):
|
| 54 |
+
for job in jobs_data['jobs']:
|
| 55 |
+
if "Model CI" in job['name'] and "models" in job['name']:
|
| 56 |
+
match = re.search(r'models/([^/)]+)', job['name'])
|
| 57 |
+
if match:
|
| 58 |
+
model_name = match.group(1).lower()
|
| 59 |
+
if model_name in audio_model_jobs:
|
| 60 |
+
audio_model_jobs[model_name].append(job['id'])
|
| 61 |
+
|
| 62 |
+
async def fetch_and_process_jobs(session, url):
|
| 63 |
+
async with session.get(url, headers=headers) as response:
|
| 64 |
+
jobs_data = await response.json()
|
| 65 |
+
process_jobs(jobs_data)
|
| 66 |
+
return response.links.get('next', {}).get('url')
|
| 67 |
+
|
| 68 |
+
async def fetch_all_jobs():
|
| 69 |
+
async with aiohttp.ClientSession() as session:
|
| 70 |
+
next_url = url
|
| 71 |
+
with tqdm(desc="Fetching jobs", unit="page") as pbar:
|
| 72 |
+
while next_url:
|
| 73 |
+
next_url = await fetch_and_process_jobs(session, next_url)
|
| 74 |
+
pbar.update(1)
|
| 75 |
+
|
| 76 |
+
def parse_test_results(text):
|
| 77 |
+
pattern = r'=+ (?:(\d+) failed,?\s*)?(?:(\d+) passed,?\s*)?(?:(\d+) skipped,?\s*)?(?:\d+ warnings?\s*)?in \d+\.\d+s'
|
| 78 |
+
match = re.search(pattern, text)
|
| 79 |
+
if match:
|
| 80 |
+
failed = int(match.group(1)) if match.group(1) else 0
|
| 81 |
+
passed = int(match.group(2)) if match.group(2) else 0
|
| 82 |
+
skipped = int(match.group(3)) if match.group(3) else 0
|
| 83 |
+
return {'failed': failed, 'passed': passed, 'skipped': skipped}
|
| 84 |
+
raise Exception("Could not find test summary in logs")
|
| 85 |
+
|
| 86 |
+
def retrieve_job_logs(job_id, job_name):
|
| 87 |
+
url = f"https://api.github.com/repos/huggingface/transformers/actions/jobs/{job_id}"
|
| 88 |
+
response = requests.get(url, headers=headers)
|
| 89 |
+
logs_url = f"https://api.github.com/repos/huggingface/transformers/actions/jobs/{job_id}/logs"
|
| 90 |
+
logs_response = requests.get(logs_url, headers=headers)
|
| 91 |
+
logs = logs_response.text
|
| 92 |
+
test_summary = parse_test_results(logs)
|
| 93 |
+
test_summary["model"] = job_name
|
| 94 |
+
test_summary["conclusion"] = response.json()['conclusion']
|
| 95 |
+
return test_summary
|
| 96 |
+
|
| 97 |
+
# Fetch initial jobs and run asynchronous job fetching
|
| 98 |
+
response = requests.get(url, headers=headers)
|
| 99 |
+
jobs = response.json()
|
| 100 |
+
process_jobs(jobs)
|
| 101 |
+
asyncio.run(fetch_all_jobs())
|
| 102 |
+
|
| 103 |
+
# Retrieve job logs and process results
|
| 104 |
+
results = []
|
| 105 |
+
for job_name, job_ids in tqdm(audio_model_jobs.items()):
|
| 106 |
+
for job_id in job_ids:
|
| 107 |
+
result = retrieve_job_logs(job_id, job_name)
|
| 108 |
+
results.append(result)
|
| 109 |
+
|
| 110 |
+
# Process results into DataFrame and save to CSV
|
| 111 |
+
df = (pd.DataFrame(results)
|
| 112 |
+
.melt(id_vars=['model', 'conclusion'],
|
| 113 |
+
value_vars=['failed', 'passed', 'skipped'],
|
| 114 |
+
var_name='test_type',
|
| 115 |
+
value_name='number_of_tests')
|
| 116 |
+
.groupby(['model', 'conclusion', 'test_type'])
|
| 117 |
+
.agg({'number_of_tests': 'sum'})
|
| 118 |
+
.reset_index())
|
| 119 |
+
|
| 120 |
+
df.to_csv('test_results_by_type.csv', index=False)
|
test_results_by_type.csv
CHANGED
|
@@ -1,58 +1,61 @@
|
|
| 1 |
model,conclusion,test_type,number_of_tests
|
| 2 |
audio_spectrogram_transformer,success,failed,0
|
| 3 |
-
audio_spectrogram_transformer,success,passed,
|
| 4 |
-
audio_spectrogram_transformer,success,skipped,
|
| 5 |
bark,failure,failed,4
|
| 6 |
-
bark,failure,passed,
|
| 7 |
bark,failure,skipped,452
|
| 8 |
clap,success,failed,0
|
| 9 |
-
clap,success,passed,
|
| 10 |
-
clap,success,skipped,
|
|
|
|
|
|
|
|
|
|
| 11 |
csm,success,failed,0
|
| 12 |
-
csm,success,passed,
|
| 13 |
-
csm,success,skipped,
|
| 14 |
-
dac,failure,failed,
|
| 15 |
-
dac,failure,passed,
|
| 16 |
-
dac,failure,skipped,
|
| 17 |
encodec,failure,failed,2
|
| 18 |
-
encodec,failure,passed,
|
| 19 |
-
encodec,failure,skipped,
|
| 20 |
-
fastspeech2_conformer,failure,failed,
|
| 21 |
-
fastspeech2_conformer,failure,passed,
|
| 22 |
fastspeech2_conformer,failure,skipped,360
|
| 23 |
granite_speech,success,failed,0
|
| 24 |
-
granite_speech,success,passed,
|
| 25 |
granite_speech,success,skipped,89
|
| 26 |
hubert,failure,failed,2
|
| 27 |
-
hubert,failure,passed,
|
| 28 |
-
hubert,failure,skipped,
|
| 29 |
mimi,failure,failed,1
|
| 30 |
mimi,failure,passed,68
|
| 31 |
mimi,failure,skipped,49
|
| 32 |
mimi,success,failed,0
|
| 33 |
mimi,success,passed,67
|
| 34 |
mimi,success,skipped,51
|
| 35 |
-
moonshine,failure,failed,
|
| 36 |
moonshine,failure,passed,157
|
| 37 |
-
moonshine,failure,skipped,
|
| 38 |
-
moshi,failure,failed,
|
| 39 |
-
moshi,failure,passed,
|
| 40 |
moshi,failure,skipped,486
|
| 41 |
musicgen,success,failed,0
|
| 42 |
-
musicgen,success,passed,
|
| 43 |
musicgen,success,skipped,410
|
| 44 |
musicgen_melody,failure,failed,2
|
| 45 |
-
musicgen_melody,failure,passed,
|
| 46 |
-
musicgen_melody,failure,skipped,
|
| 47 |
musicgen_melody,success,failed,0
|
| 48 |
-
musicgen_melody,success,passed,
|
| 49 |
-
musicgen_melody,success,skipped,
|
| 50 |
pop2piano,success,failed,0
|
| 51 |
pop2piano,success,passed,134
|
| 52 |
pop2piano,success,skipped,316
|
| 53 |
seamless_m4t,success,failed,0
|
| 54 |
-
seamless_m4t,success,passed,
|
| 55 |
-
seamless_m4t,success,skipped,
|
| 56 |
seamless_m4t_v2,success,failed,0
|
| 57 |
seamless_m4t_v2,success,passed,192
|
| 58 |
seamless_m4t_v2,success,skipped,296
|
|
@@ -62,12 +65,15 @@ sew,success,skipped,198
|
|
| 62 |
sew_d,success,failed,0
|
| 63 |
sew_d,success,passed,100
|
| 64 |
sew_d,success,skipped,258
|
| 65 |
-
speech_to_text,failure,failed,
|
| 66 |
-
speech_to_text,failure,passed,
|
| 67 |
-
speech_to_text,failure,skipped,
|
|
|
|
|
|
|
|
|
|
| 68 |
speecht5,success,failed,0
|
| 69 |
-
speecht5,success,passed,
|
| 70 |
-
speecht5,success,skipped,
|
| 71 |
unispeech,success,failed,0
|
| 72 |
unispeech,success,passed,174
|
| 73 |
unispeech,success,skipped,190
|
|
@@ -75,14 +81,14 @@ unispeech_sat,success,failed,0
|
|
| 75 |
unispeech_sat,success,passed,326
|
| 76 |
unispeech_sat,success,skipped,292
|
| 77 |
univnet,success,failed,0
|
| 78 |
-
univnet,success,passed,
|
| 79 |
-
univnet,success,skipped,
|
| 80 |
vits,failure,failed,2
|
| 81 |
vits,failure,passed,248
|
| 82 |
vits,failure,skipped,304
|
| 83 |
wav2vec2,success,failed,0
|
| 84 |
-
wav2vec2,success,passed,
|
| 85 |
-
wav2vec2,success,skipped,
|
| 86 |
wav2vec2_bert,success,failed,0
|
| 87 |
wav2vec2_bert,success,passed,162
|
| 88 |
wav2vec2_bert,success,skipped,334
|
|
@@ -96,5 +102,5 @@ wavlm,success,failed,0
|
|
| 96 |
wavlm,success,passed,122
|
| 97 |
wavlm,success,skipped,242
|
| 98 |
whisper,failure,failed,4
|
| 99 |
-
whisper,failure,passed,
|
| 100 |
-
whisper,failure,skipped,
|
|
|
|
| 1 |
model,conclusion,test_type,number_of_tests
|
| 2 |
audio_spectrogram_transformer,success,failed,0
|
| 3 |
+
audio_spectrogram_transformer,success,passed,234
|
| 4 |
+
audio_spectrogram_transformer,success,skipped,192
|
| 5 |
bark,failure,failed,4
|
| 6 |
+
bark,failure,passed,438
|
| 7 |
bark,failure,skipped,452
|
| 8 |
clap,success,failed,0
|
| 9 |
+
clap,success,passed,356
|
| 10 |
+
clap,success,skipped,526
|
| 11 |
+
csm,failure,failed,1
|
| 12 |
+
csm,failure,passed,109
|
| 13 |
+
csm,failure,skipped,91
|
| 14 |
csm,success,failed,0
|
| 15 |
+
csm,success,passed,112
|
| 16 |
+
csm,success,skipped,89
|
| 17 |
+
dac,failure,failed,22
|
| 18 |
+
dac,failure,passed,105
|
| 19 |
+
dac,failure,skipped,271
|
| 20 |
encodec,failure,failed,2
|
| 21 |
+
encodec,failure,passed,122
|
| 22 |
+
encodec,failure,skipped,270
|
| 23 |
+
fastspeech2_conformer,failure,failed,5
|
| 24 |
+
fastspeech2_conformer,failure,passed,323
|
| 25 |
fastspeech2_conformer,failure,skipped,360
|
| 26 |
granite_speech,success,failed,0
|
| 27 |
+
granite_speech,success,passed,243
|
| 28 |
granite_speech,success,skipped,89
|
| 29 |
hubert,failure,failed,2
|
| 30 |
+
hubert,failure,passed,338
|
| 31 |
+
hubert,failure,skipped,544
|
| 32 |
mimi,failure,failed,1
|
| 33 |
mimi,failure,passed,68
|
| 34 |
mimi,failure,skipped,49
|
| 35 |
mimi,success,failed,0
|
| 36 |
mimi,success,passed,67
|
| 37 |
mimi,success,skipped,51
|
| 38 |
+
moonshine,failure,failed,5
|
| 39 |
moonshine,failure,passed,157
|
| 40 |
+
moonshine,failure,skipped,192
|
| 41 |
+
moshi,failure,failed,10
|
| 42 |
+
moshi,failure,passed,462
|
| 43 |
moshi,failure,skipped,486
|
| 44 |
musicgen,success,failed,0
|
| 45 |
+
musicgen,success,passed,478
|
| 46 |
musicgen,success,skipped,410
|
| 47 |
musicgen_melody,failure,failed,2
|
| 48 |
+
musicgen_melody,failure,passed,256
|
| 49 |
+
musicgen_melody,failure,skipped,150
|
| 50 |
musicgen_melody,success,failed,0
|
| 51 |
+
musicgen_melody,success,passed,252
|
| 52 |
+
musicgen_melody,success,skipped,156
|
| 53 |
pop2piano,success,failed,0
|
| 54 |
pop2piano,success,passed,134
|
| 55 |
pop2piano,success,skipped,316
|
| 56 |
seamless_m4t,success,failed,0
|
| 57 |
+
seamless_m4t,success,passed,450
|
| 58 |
+
seamless_m4t,success,skipped,432
|
| 59 |
seamless_m4t_v2,success,failed,0
|
| 60 |
seamless_m4t_v2,success,passed,192
|
| 61 |
seamless_m4t_v2,success,skipped,296
|
|
|
|
| 65 |
sew_d,success,failed,0
|
| 66 |
sew_d,success,passed,100
|
| 67 |
sew_d,success,skipped,258
|
| 68 |
+
speech_to_text,failure,failed,2
|
| 69 |
+
speech_to_text,failure,passed,228
|
| 70 |
+
speech_to_text,failure,skipped,252
|
| 71 |
+
speech_to_text,success,failed,0
|
| 72 |
+
speech_to_text,success,passed,227
|
| 73 |
+
speech_to_text,success,skipped,255
|
| 74 |
speecht5,success,failed,0
|
| 75 |
+
speecht5,success,passed,755
|
| 76 |
+
speecht5,success,skipped,917
|
| 77 |
unispeech,success,failed,0
|
| 78 |
unispeech,success,passed,174
|
| 79 |
unispeech,success,skipped,190
|
|
|
|
| 81 |
unispeech_sat,success,passed,326
|
| 82 |
unispeech_sat,success,skipped,292
|
| 83 |
univnet,success,failed,0
|
| 84 |
+
univnet,success,passed,123
|
| 85 |
+
univnet,success,skipped,167
|
| 86 |
vits,failure,failed,2
|
| 87 |
vits,failure,passed,248
|
| 88 |
vits,failure,skipped,304
|
| 89 |
wav2vec2,success,failed,0
|
| 90 |
+
wav2vec2,success,passed,684
|
| 91 |
+
wav2vec2,success,skipped,752
|
| 92 |
wav2vec2_bert,success,failed,0
|
| 93 |
wav2vec2_bert,success,passed,162
|
| 94 |
wav2vec2_bert,success,skipped,334
|
|
|
|
| 102 |
wavlm,success,passed,122
|
| 103 |
wavlm,success,skipped,242
|
| 104 |
whisper,failure,failed,4
|
| 105 |
+
whisper,failure,passed,1024
|
| 106 |
+
whisper,failure,skipped,742
|