Comments (4)
@DongXingshuai I found out why. Apparently, a meta_note
was not available in a paper (hence the error). Putting a try... except
fixed it!
Here is the updated filted_data
function:
def filter_data(item,
review_keys=['summary_of_the_paper', 'strength_and_weaknesses', 'clarity,_quality,_novelty_and_reproducibility', 'summary_of_the_review'],
decision=True):
"""Filter only ratings, confidence, withdraw status and decisions"""
# parse each note
withdraw = 0
try:
# filter meta note
meta_note = [d for d in item if 'Paper' not in d['invitation']]
# check withdrawn
withdraw = 1 if 'Withdrawn_Submission' in meta_note[0]['invitation'] else 0
except:
# note: simple pass for no meta notes
pass
# decision
if decision:
try:
if withdraw == 0:
decision_note = [d for d in item if 'Decision' in d['invitation']]
decision = decision_note[0]['content']['decision']
else:
decision = ''
except:
decision = ''
# filter reviewer comments
comment_notes = [d for d in item \
if 'Official_Review' in d['invitation'] and 'recommendation' in d['content'].keys()]
comment_notes = sorted(comment_notes, key=lambda d: d['number'])[::-1]
ratings = [int(note['content']['recommendation'].split(':')[0]) for note in comment_notes]
confidences = [int(note['content']['confidence'].split(':')[0]) for note in comment_notes]
review_lengths = [sum(len(note['content'][key].split()) for key in review_keys) for note in comment_notes] # review lengths
data = {'ratings': ratings, 'confidences': confidences, 'withdraw': withdraw, 'review_lengths': review_lengths}
if decision: data['decision'] = decision
return data
```
from iclr2023-openreviewdata.
@fedebotu thank you very much.
from iclr2023-openreviewdata.
Hi, could you give more context for your error? I saw you are using a .py
file. Is it the same as the .ipynb
notebook?
As a quick bugfix, you may also try to re-run your program since as I remember it could be a network error
from iclr2023-openreviewdata.
@fedebotu Thank you very much for your reply.
I converted the .ipynv file to .py. I have tried a few times, all failed due to the same problem.
from iclr2023-openreviewdata.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iclr2023-openreviewdata.