-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom decision options #2115
Conversation
Thanks for pushing the code, my recommendation is always starting with the test and then the implementation. This is known as TDD (test development driven) and let you build the feature while you are running it.
From that you start making the changes. |
This reverts commit e42e709.
openreview/tools.py
Outdated
if decision: | ||
venue += ' ' + decision.strip() | ||
elif accept_options and decision_option in accept_options: | ||
venue += ' ' + decision.strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we always should replace Accept
right? Some of the accept_options
might have the word Accept and we should treat those the same way we used to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like with this approach, we are doing a combination of checking for 'Accept' and using accept_decision_options
?
For example, if I have an option Accept (Oral)
in the decision_options, but not in accept_decision_options, it is still treated as an accept?
Not sure if this approach is right or wrong, but want to double check this is the desired behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, basically we only check for "Accept" if accept_decision_options
is empty. This is to make it backwards compatible and not let API 1 tests fail and have to make lots of changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct and that is what is implemented now.
if accept_decision_options then check if decision is in option then marked as accept
else if 'Accept' is in decision then marked as accept
We need to reflect that in the documentation. Correct me if I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok! I thought this should be the behavior, but from what I see here we are always checking if the decision has 'Accept', regardless of if we have accept_decision_options
or not.
Just to be clear @melisabok: a decision of Accept (Oral)
that was not specified in accept_decision_options
should not be treated as an accept, assuming accept_decision_options
is non-empty, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, accept_decision_options overwrites the "Accept" string rule.
you are right, the tools implementation should check the accept_decision_options first and then the string rule like in other parts of the code. Emilia could you change it?
'value-regex': '.*', | ||
'order': 30 | ||
}, | ||
'make_decisions_public': {'description': 'Should the decisions be made public immediately upon posting? Default is "No, decisions should NOT be revealed publicly when they are posted".', | ||
'accept_decision_options': { | ||
'description': 'What are the accept decision options? If your accept options do not contain "Accept", please specify them here. Provide comma separated values, e.g. "Accept (Best Paper), Invite to Archive".', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know there is an example, but the wording of
If your accept options do not contain "Accept", please specify them here.
makes it sound like PCs should only specify those accept options that do not contain the word Accept
, and it could be confusing.
Maybe something like:
What are the accept decision options? Please specify all decision options that signify acceptance to the venue. Any decision option not specified here will be treated as a rejection.
tests/test_workshop_v2.py
Outdated
@@ -360,7 +360,8 @@ def test_publication_chair(self, client, openreview_client, helpers): | |||
content={ | |||
'decision_start_date': start_date.strftime('%Y/%m/%d'), | |||
'decision_deadline': due_date.strftime('%Y/%m/%d'), | |||
'decision_options': 'Accept, Reject', | |||
'decision_options': 'Invite to Venue, Reject', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an option Accept
here and as an accept_decision_option
? Also, could you add a check for what the venue value should be for every decision option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it looks like the homepage is not showing the tab 'Invite to Venue' with the accepted papers. I think there is a get_decision_heading_map()
function in helpers that you need to edit. Could you also add this to the test? There is an example here:
openreview-py/tests/test_arr_venue_v2.py
Line 1899 in c4892b1
request_page(selenium, 'http://localhost:3030/group?id=aclweb.org/ACL/ARR/2023/August', None, wait_for_element='header') |
I'm unable to get the homepage tab tests working, no idea why. They show up in the browser. I've tried both |
I can take a look, just to confirm is the same test that is failing in circleci? |
'decision_options': { | ||
'description': 'What are the decision options (provide comma separated values, e.g. Accept (Best Paper), Accept, Reject)? Leave empty for default options - "Accept (Oral)", "Accept (Poster)", "Reject"', | ||
'description': 'List all decision options. By default, decisions containing "Accept" signify acceptance to the venue. Otherwise, please specify the accept options in "Accept Decision Options". All other decisions will be treated as a rejection. Provide comma separated values, e.g. "Accept (Best Paper), Invite to Archive, Reject". Leave empty for default options - "Accept (Oral)", "Accept (Poster)", "Reject"', | ||
'value-regex': '.*', | ||
'order': 30 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about changing the description to just:
List all decision options. Provide comma separated values, e.g. "Accept (Best Paper), Invite to Archive, Reject". Leave empty for default options - "Accept (Oral)", "Accept (Poster)", "Reject"
I'm worried it's too confusing and PCs would fill out the fields incorrectly. For example, if "Accept" and "Invite to Archive" are considered accept options, they may just put "Invite to Archive" in accept_decision_options
. I think this would cause even "Accept" papers to be rejected since it's not listed as an accept option. We could also add to the accept_decision_options
description something like:
Leaving this empty will treat only decisions with "Accept" as accepted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the field mandatory and have a default value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do use ['Accept (Oral)', 'Accept (Poster)', 'Reject']
as the default options in the request form if they leave the field empty. Do you want this value to be added to the request form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think it is more clear for the users to know which are the default options how they can edit them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think with the simplified description we don't need to make the fields required. I fixed it and added the default value. I think it's much better now.
openreview/tools.py
Outdated
decision = decision_option.replace('Accept', '') | ||
decision = re.sub(r'[()\W]+', '', decision) | ||
if decision: | ||
decision = re.sub(r'[()\W]+', '', decision_option) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be inside the if, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems the condition if (not accept_options and 'Accept' in decision_option) or (accept_options and decision_option in accept_options)
is used in several places, can we create a tools function that we use from the venue class, process function and this function too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that would be great, updated to add the tools function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Allows custom decision options.
Tests still need to be added here.Adds
accept_decision_options
to request form. Ifaccept_decision_options
is empty, we check for the 'Accept' substring in decisions to mark accepted papers. Ifaccept_decision_options
is populated, we use those values to mark accepted papers.