Last active
August 12, 2024 03:16
-
-
Save mrdrozdov/f6c573ec221bb5240ddd966fb43c67cb to your computer and use it in GitHub Desktop.
ICLR 2024 Stats
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
import collections | |
import json | |
import os | |
import openreview | |
with open('creds.json') as f: | |
creds = json.loads(f.read()) | |
cache_file = 'iclr_2024_submissions.json' | |
# API V2 | |
client = openreview.api.OpenReviewClient( | |
baseurl='https://api2.openreview.net', | |
username=creds['username'], | |
password=creds['password'], | |
) | |
if not os.path.exists(cache_file): | |
venue_id = 'ICLR.cc/2024/Conference' | |
venue_group = client.get_group(f'{venue_id}') | |
submission_name = venue_group.content['submission_name']['value'] | |
submissions = client.get_all_notes(invitation=f'{venue_id}/-/{submission_name}') | |
data = [x.to_json() for x in submissions] | |
with open(cache_file, 'w') as f: | |
f.write(json.dumps(data)) | |
else: | |
with open(cache_file) as f: | |
data = json.loads(f.read()) | |
c_author = collections.Counter() | |
c_first_author = collections.Counter() | |
c_venue = collections.Counter() | |
author_to_paper = collections.defaultdict(list) | |
def fix_venue(venue): | |
# ICLR 2024 Conference Withdrawn Submission: 1615 | |
# ICLR 2024 poster: 1807 | |
# Submitted to ICLR 2024: 3476 | |
# ICLR 2024 Conference Desk Rejected Submission: 53 | |
# ICLR 2024 spotlight: 367 | |
# ICLR 2024 oral: 86 | |
if venue == 'ICLR 2024 Conference Withdrawn Submission': | |
return 'Withdrawn' | |
elif venue in ('ICLR 2024 poster', 'ICLR 2024 spotlight', 'ICLR 2024 oral'): | |
return 'Accepted' | |
elif venue == 'Submitted to ICLR 2024': | |
return 'Rejected' | |
elif venue == 'ICLR 2024 Conference Desk Rejected Submission': | |
return 'Desk Rejected' | |
else: | |
raise ValueError(f'Unknown venue: {venue}') | |
for x in data: | |
authors = x['content']['authors']['value'] | |
venue = x['content']['venue']['value'] | |
for author in authors: | |
author_to_paper[author].append(x) | |
c_author.update(authors) | |
c_first_author[authors[0]] += 1 | |
venue = fix_venue(venue) | |
c_venue[venue] += 1 | |
def get_author_paper_stats(author, author_to_paper): | |
papers = author_to_paper[author] | |
c_venues = collections.Counter([fix_venue(x['content']['venue']['value']) for x in papers]) | |
return c_venues | |
# Summarize author stats. | |
print('Top 30 authors:') | |
for author, count in c_author.most_common(30): | |
this_c_venues = get_author_paper_stats(author, author_to_paper) | |
print(f'{author}: {count} --- {this_c_venues}') | |
# Summarize first author stats. | |
print('Top 30 first authors:') | |
for author, count in c_first_author.most_common(30): | |
this_c_venues = get_author_paper_stats(author, author_to_paper) | |
print(f'{author}: {count} --- {this_c_venues}') | |
# Summarize venue stats. | |
print('Venues:') | |
for venue, count in c_venue.items(): | |
print(f'{venue}: {count}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment