-
Notifications
You must be signed in to change notification settings - Fork 317
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
partial credit for autograde test cells #1090
Conversation
Looks like I've got a failing test. Let me investigate.... |
Still one test failing ( |
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.
This looks really great, thanks! My comments are mainly just having to do with when to raise errors versus not---otherwise I am very happy with this.
btw, I think the test failure is probably spurious, I have restarted the tests to see. |
Thanks for the comments! - nothing objectionable from my perspective. Will make the modifications in the next day or two. |
@jhamrick - can you point me to an example for for how you would have code in |
@kcranston I think the easiest way to do it would be to have the |
|
||
# it's a markdown cell, so we can't do anything | ||
if score is None: | ||
pass | ||
elif score >= max_score: | ||
elif score == max_score: |
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.
Probably better to keep this as it was, in case the score is greater than the max score that also shouldn't count as failed:
elif score == max_score: | |
elif score >= max_score: |
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 can change that, but then also need to update get_partial_grade
, which currently returns a ValueError when score > max_score. Should I revert that back to a warning again?
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.
Thanks! I just have the one comment about the comparison between the score and max score, otherwise I think this is good to merge.
Oh, I see, sorry I missed that. No, in that case I think it should be fine.
I just want to test this doesn't cause problems when assigning extra credit
which I'll try to do tonight and then that works ok I will go ahead and
merge. Thanks a lot for working on this!
…On Wed, Jun 19, 2019 at 8:06 AM Karen Cranston ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In nbgrader/validator.py
<#1090 (comment)>:
>
# it's a markdown cell, so we can't do anything
if score is None:
pass
- elif score >= max_score:
+ elif score == max_score:
I can change that, but then also need to update get_partial_grade, which
currently returns a ValueError when score > max_score. Should I revert that
back to a warning again?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1090?email_source=notifications&email_token=AAAUL5AGZOIVSDLZGDIEK7LP3IOL5A5CNFSM4HPRK7MKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB376R4Y#discussion_r295261254>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAUL5ECHUYAIWNRGX5S7TDP3IOL5ANCNFSM4HPRK7MA>
.
|
Thanks, @jhamrick ! I'll work on updating the docs, along with an example notebook (separate PR). |
hey @kcranston @jhamrick curious what the time associated with getting this merged is? |
Pinging again. @lwasser and I are writing notebooks that use this functionality and planning to use in a class starting next week. Is it possible to have this merged this week? |
hey @jhamrick i know you are super busy. we do need to use this functionality in our class and it starts next week. what do you need from us to get this merged at this point? we are installing from conda-forge so it would be ideal to get things merged and to bump a patch (IF you are comfortable with that) this week to support our environment setup and such. please just let us know what you need. |
Closes #974 . When grading, look for output from an autograde test cell that is a single value that can be cast to a floating point value greater than 0. Return
min(output, max_points)
, i.e. if the cell returns more than the max_points, simply return max_points.Thinking of this as version 1.0. In subsequent versions, planning to allow an autograde cell to return formatted json output (which can include scores, messages for students, tracebacks from errors, etc).
Have not added docs yet - looking for feedback on the implementation first, then I can modify docs either in this PR or a subsequent.