|
15 | 15 | # Define reviewers |
16 | 16 | reviewers = [f"Reviewer {i}" for i in range(1, 8)] |
17 | 17 |
|
18 | | -# Define rubric |
| 18 | +# Updated full rubric |
19 | 19 | rubric = [ |
20 | 20 | ("Technical Expertise", "Proficiency with the PyTorch Ecosystem", "Demonstrated knowledge and practical experience with PyTorch, including model building, traininga and deployment?"), |
21 | 21 | ("Technical Expertise", "Proficiency with the PyTorch Ecosystem", "Familiarity with foundation-hosted projects, vLLM, DeepSpeed?"), |
|
38 | 38 | ("Alignment and Values", "Alignment with PyTorch Foundation Values", "Commitment to open source principles, community-first development, and inclusive collaboration?"), |
39 | 39 | ("Alignment and Values", "Alignment with PyTorch Foundation Values", "Advocacy for responsible AI development and ethical machine learning practices?"), |
40 | 40 | ("Motivation and Vision", "Vision", "Clear articulation of why they want to be an Ambassador and what they hope to accomplish?"), |
41 | | - ("Motivation and Vision", "Vision", "Proposed goals or initiatives that align with the mission of the PyTorch Foundation?") |
| 41 | + ("Motivation and Vision", "Vision", "Proposed goals or initiatives that align with the mission of the PyTorch Foundation?"), |
| 42 | + ("Additional Bonus Criteria", "Cross-Community Collaboration", "Contributions or bridges to other relevant ecosystems (e.g., HuggingFace?)"), |
| 43 | + ("Additional Bonus Criteria", "Cross-Community Collaboration", "Integration work across tools or libraries within the AI/ML infrastructure landscape?"), |
| 44 | + ("Additional Bonus Criteria", "Geographic and Demographic Diversity", "Representation from underrepresented regions or groups to foster inclusivity and global outreach?"), |
| 45 | + ("Additional Bonus Criteria", "Innovation and Pioneering Work", "Early adoption or novel application of PyTorch or its ecosystem tools in industry, research, or startups?"), |
| 46 | + ("Credibility", "Community References", "References from other known community members?") |
42 | 47 | ] |
43 | 48 |
|
44 | | -summary_categories = [ |
45 | | - "Technical Expertise", |
46 | | - "Open Source Contributions", |
47 | | - "Thought Leadership and Technical Writing", |
48 | | - "Community Engagement and Evangelism", |
49 | | - "Online Influence and Reach", |
50 | | - "Alignment and Values", |
51 | | - "Motivation and Vision" |
52 | | -] |
| 49 | +# All categories in correct order |
| 50 | +categories = list(dict.fromkeys([cat for cat, _, _ in rubric])) |
53 | 51 |
|
| 52 | +# Output folder |
54 | 53 | output_folder = "ambassador/reviewer_sheets_excel" |
55 | 54 | os.makedirs(output_folder, exist_ok=True) |
56 | 55 |
|
| 56 | +# Assign reviewers |
57 | 57 | assignments = [] |
58 | 58 | reviewer_counts = defaultdict(int) |
59 | 59 | for submission in submissions: |
|
62 | 62 | reviewer_counts[reviewer] += 1 |
63 | 63 | assignments.append((submission, reviewer)) |
64 | 64 |
|
| 65 | +# Generate reviewer workbooks |
65 | 66 | for reviewer in reviewers: |
66 | 67 | wb = Workbook() |
67 | 68 | ws = wb.active |
68 | 69 | ws.title = "Review Sheet" |
69 | 70 | summary_ws = wb.create_sheet("Score Summary") |
70 | 71 |
|
71 | | - headers = [ |
72 | | - "Submission ID", "First Name", "Last Name", "Submission Summary", |
73 | | - "Reviewer's Comment", "Category", "Subcategory", "Question", "Score" |
74 | | - ] |
75 | | - ws.append(headers) |
76 | | - for col in range(1, len(headers) + 1): |
77 | | - ws.cell(row=1, column=col).font = Font(bold=True) |
| 72 | + # Headers |
| 73 | + ws.append(["Submission ID", "First Name", "Last Name", "Submission Summary", "Reviewer's Comment", "Category", "Subcategory", "Question", "Score"]) |
| 74 | + for cell in ws[1]: cell.font = Font(bold=True) |
78 | 75 |
|
79 | 76 | dv = DataValidation(type="list", formula1='"Yes,No,N/A"', allow_blank=True) |
80 | 77 | ws.add_data_validation(dv) |
|
105 | 102 |
|
106 | 103 | for col in [1, 2, 3, 4]: |
107 | 104 | ws.merge_cells(start_row=start, end_row=end, start_column=col, end_column=col) |
108 | | - cell = ws.cell(row=start, column=col) |
109 | | - cell.alignment = Alignment(vertical="top", wrap_text=True) |
110 | | - |
| 105 | + ws.cell(row=start, column=col).alignment = Alignment(vertical="top", wrap_text=True) |
111 | 106 | for r in range(start, end + 1): |
112 | 107 | dv.add(ws[f"I{r}"]) |
113 | 108 |
|
| 109 | + # Auto column width |
114 | 110 | for col in ws.columns: |
115 | 111 | max_len = max((len(str(cell.value)) if cell.value else 0) for cell in col) |
116 | 112 | ws.column_dimensions[get_column_letter(col[0].column)].width = min(max_len + 5, 50) |
117 | 113 |
|
118 | | - summary_ws.append(["Submission ID", "First Name", "Last Name"] + summary_categories + ["Final Score"]) |
119 | | - for col in range(1, summary_ws.max_column + 1): |
120 | | - summary_ws.cell(row=1, column=col).font = Font(bold=True) |
| 114 | + # Score Summary Sheet |
| 115 | + summary_ws.append(["Submission ID", "First Name", "Last Name"] + categories + ["Final Score"]) |
| 116 | + for cell in summary_ws[1]: cell.font = Font(bold=True) |
121 | 117 |
|
122 | 118 | for sid, fname, lname, start, end in candidate_ranges: |
123 | | - category_rows = defaultdict(list) |
124 | | - for r in range(start, end + 1): |
125 | | - category = ws.cell(row=r, column=6).value |
126 | | - if category in summary_categories: |
127 | | - category_rows[category].append(r) |
128 | | - |
129 | | - formula_cells = [] |
130 | | - for cat in summary_categories: |
131 | | - if cat in category_rows: |
132 | | - rng = category_rows[cat] |
133 | | - formula = f"=SUMPRODUCT(--('Review Sheet'!I{rng[0]}:I{rng[-1]}=\"Yes\"))" |
| 119 | + cat_formulas = [] |
| 120 | + for cat in categories: |
| 121 | + rows = [r for r in range(start, end + 1) if ws.cell(row=r, column=6).value == cat] |
| 122 | + if rows: |
| 123 | + cat_range = f"Review Sheet!I{rows[0]}:I{rows[-1]}" |
| 124 | + cat_formulas.append(f"=SUMPRODUCT(--({cat_range}=\"Yes\"))") |
134 | 125 | else: |
135 | | - formula = "0" |
136 | | - formula_cells.append(formula) |
137 | | - |
138 | | - final_formula = f"=SUM({','.join([get_column_letter(i + 4) + str(summary_ws.max_row + 1) for i in range(len(formula_cells))])})" |
139 | | - summary_ws.append([sid, fname, lname] + formula_cells + [final_formula]) |
| 126 | + cat_formulas.append("=0") |
| 127 | + total_formula = f"=SUM({','.join([get_column_letter(i + 4) + str(summary_ws.max_row + 1) for i in range(len(categories))])})" |
| 128 | + summary_ws.append([sid, fname, lname] + cat_formulas + [total_formula]) |
140 | 129 |
|
141 | | - path = os.path.join(output_folder, f"{reviewer.replace(' ', '_').lower()}_sheet.xlsx") |
142 | | - wb.save(path) |
| 130 | + # Save workbook |
| 131 | + wb.save(os.path.join(output_folder, f"{reviewer.replace(' ', '_').lower()}_sheet.xlsx")) |
143 | 132 |
|
144 | | -print("✅ Reviewer sheets generated with fixed formulas and matching structure.") |
| 133 | +print("✅ Reviewer sheets generated with aligned rubric and score summary.") |
0 commit comments