-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from commit-0/analysis_in_docs
submissions analysis + webpage rendering
- Loading branch information
Showing
6 changed files
with
198 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
Update HF dataset then: | ||
``` | ||
python docs/update_submissions_dataset.py | ||
``` | ||
|
||
Run submissions analysis on SPLIT | ||
``` | ||
python docs/render_submissions.py | ||
--do_setup --get_blank_details --get_reference_details # only once, at beginning of setting up environment | ||
--analyze_submissions | ||
--split SPLIT | ||
``` | ||
|
||
Render webpages on submissions. | ||
``` | ||
python docs/render_submissions.py --render_webpages --overwrite_previous_eval | ||
``` | ||
|
||
Deploy to website. | ||
``` | ||
cd ../commit-0.github.io | ||
mkdocs gh-deploy --config-file ../commit0/mkdocs.yml --remote-branch main | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
document$.subscribe(function() { | ||
var tables = document.querySelectorAll("article table:not([class])") | ||
tables.forEach(function(table) { | ||
new Tablesort(table) | ||
}) | ||
}) | ||
var tables = document.querySelectorAll("article table:not([class])") | ||
tables.forEach(function(table) { | ||
new Tablesort(table); | ||
// Automatically sort the table by the specified column | ||
var defaultSortColumn = 2; // Index of the column to sort (0-based) | ||
var isAscending = False; // Set to false for descending order | ||
|
||
// Delay to ensure Tablesort is fully initialized | ||
setTimeout(function () { | ||
var header = table.querySelectorAll("thead th")[defaultSortColumn]; | ||
if (header) { | ||
header.click(); // Simulate a click on the header | ||
if (!isAscending) { | ||
header.click(); // Click again for descending order | ||
} | ||
} | ||
}, 100); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(function(){ | ||
var cleanNumber = function(i) { | ||
return i.replace(/[^\-?0-9.]/g, ''); | ||
}, | ||
|
||
compareNumber = function(a, b) { | ||
a = parseFloat(a); | ||
b = parseFloat(b); | ||
|
||
a = isNaN(a) ? 0 : a; | ||
b = isNaN(b) ? 0 : b; | ||
|
||
return a - b; | ||
}; | ||
|
||
Tablesort.extend('number', function(item) { | ||
return item.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/) || // Prefixed currency | ||
item.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/) || // Suffixed currency | ||
item.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/); // Number | ||
}, function(a, b) { | ||
a = cleanNumber(a); | ||
b = cleanNumber(b); | ||
|
||
return compareNumber(b, a); | ||
}); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
from datasets import Dataset | ||
|
||
submissions = { | ||
"org_name": ["test-save-commit0", "commit0-lite-with-test", "commit0-lite-plain", "commit0-all-plain"], | ||
"branch": ["baseline", "fillin", "fillin", "fillin"], | ||
"display_name": ["Claude Sonnet 3.5 - Base", "Claude Sonnet 3.5 - Fill-in + Unit Test Feedback", "Claude Sonnet 3.5 - Fill-in", "Claude Sonnet 3.5 - Fill-in"], | ||
"submission_date": ["09/25/2024", "09/25/2024", "09/25/2024", "09/25/2024"], | ||
"split": ["lite", "lite", "lite", "all"], | ||
"project_page": ["https://github.com/test-save-commit0", "https://github.com/commit0-lite-with-test", "https://github.com/commit0-lite-plain", "https://github.com/commit0-all-plain"] | ||
"org_name": [ | ||
"test-save-commit0", | ||
"commit0-fillin", | ||
"commit0-lite-test", | ||
"openhands-commit0", | ||
"sweagent-commit0", | ||
], | ||
"branch": ["baseline", "sonnet", "sonnet", "openhands", "sweagent"], | ||
"display_name": [ | ||
"Claude Sonnet 3.5 - Base", | ||
"Claude Sonnet 3.5 - Fill-in", | ||
"Claude Sonnet 3.5 - Fill-in + Lint & Unit Test Feedback", | ||
"OpenHands", | ||
"SWE-Agent", | ||
], | ||
"submission_date": [ | ||
"09/25/2024", | ||
"09/25/2024", | ||
"09/25/2024", | ||
"11/25/2024", | ||
"11/26/2024", | ||
], | ||
"split": ["lite", "all", "lite", "all", "lite"], | ||
"project_page": [ | ||
"https://github.com/test-save-commit0", | ||
"https://github.com/commit0-fillin", | ||
"https://github.com/commit0-lite-test", | ||
"https://github.com/openhands-commit0", | ||
"https://github.com/sweagent-commit0", | ||
], | ||
} | ||
|
||
Dataset.from_dict(submissions).push_to_hub("celinelee/commit0_submissions") | ||
Dataset.from_dict(submissions).push_to_hub("celinelee/commit0_submissions") |
Oops, something went wrong.