Spaces:
Sleeping
Sleeping
added submission cache
Browse files
app.py
CHANGED
@@ -50,17 +50,30 @@ def pdf_to_text(pdf):
|
|
50 |
return paper_text
|
51 |
|
52 |
# loads all 2024 ICLR submissions from OpenReview
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
# returns review and pdf paper text given paper id and reviewer id
|
66 |
def parse_openreview_id(submissions, paper_id, reviewer_id):
|
|
|
50 |
return paper_text
|
51 |
|
52 |
# loads all 2024 ICLR submissions from OpenReview
|
53 |
+
submissions_path = "./submissions_iclr2024.pkl"
|
54 |
+
# API V2
|
55 |
+
client = openreview.api.OpenReviewClient(
|
56 |
+
baseurl='https://api2.openreview.net',
|
57 |
+
)
|
58 |
+
|
59 |
+
# Get ICLR venues
|
60 |
+
venues = client.get_group(id='venues').members
|
61 |
+
iclr_venues = [v for v in venues if "iclr.cc" in v.lower() and "conference" in v.lower()]
|
62 |
+
|
63 |
+
@st.cache_data
|
64 |
+
def load_submissions():
|
65 |
+
if os.path.exists(submissions_path):
|
66 |
+
with open(submissions_path, "rb") as f:
|
67 |
+
return pickle.load(f)
|
68 |
+
else:
|
69 |
+
# Select the second latest venue
|
70 |
+
venue_id = iclr_venues[-2]
|
71 |
+
venue_group = client.get_group(venue_id)
|
72 |
+
submission_name = venue_group.content['submission_name']['value']
|
73 |
+
submissions = client.get_all_notes(invitation=f'{venue_id}/-/{submission_name}', details='replies')
|
74 |
+
with open(submissions_path, "wb") as f:
|
75 |
+
pickle.dump(submissions, f)
|
76 |
+
return submissions
|
77 |
|
78 |
# returns review and pdf paper text given paper id and reviewer id
|
79 |
def parse_openreview_id(submissions, paper_id, reviewer_id):
|