Skip to content
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

Duplicate grade_ids #1753

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Duplicate grade_ids #1753

wants to merge 6 commits into from

Conversation

tuncbkose
Copy link
Contributor

Here is a proposal on how to deal with duplicate grade_ids during autograding. Feedback is very welcome. Note that three of these commits might be worth considering merging independent of this PR:

  • 3c51d4d fixes an old testing bug unrelated to this PR (I can make a pr for this separately if requested).
  • c28a52a changes CheckCellMetadata error message to add duplicate cells as a possible reason why the error is encountered. This might be desirable as it would allow users to notice the duplication problem during validation and try to fix it before submission.
  • bac7c76 tweaks the error handling in the base converter.py to allow continuing with the other submitted notebooks (from the same student) in an assignment even if one of them is problematic. This way, for example, if an assignment had multiple notebooks and only one contained a duplicated cell, the rest would still get autograded.

Dealing with duplicate grade_ids

The main idea of this PR is to add a duplicate flag to cells that were observed to have duplicate grade_ids during autograding, so that they can be ignored and the rest of the notebook can be autograded. At the end of autograding, the duplicate flag is caught in order to raise an error and let the instructor know that some cells were ignored. These ignored cells are also marked with a comment for easy identification, however, the problem of the instructor editing the notebook remains unfixed (as it breaks the feedback workflow, #1202).

3b3c672 changes the order cells are processed by `DeduplicateIds´ with the idea that often if one is copy-pasting a cell, the pasted cell goes below the original one. This makes it more likely for the original to be more important for the grading, implying that we should be ignoring the cells lower in the notebook.

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch AaltoSciComp/nbgrader/duplicate-2

@tuncbkose tuncbkose force-pushed the duplicate-2 branch 4 times, most recently from 97ce674 to 38f7517 Compare March 15, 2023 09:59
@tuncbkose tuncbkose marked this pull request as ready for review March 15, 2023 10:22
@Gehock Gehock force-pushed the duplicate-2 branch 2 times, most recently from d4d99c8 to b0cec45 Compare October 1, 2024 16:32
@Gehock
Copy link

Gehock commented Oct 1, 2024

Rebased on top of the current main branch

@Gehock
Copy link

Gehock commented Oct 4, 2024

Updated the schema version on a couple of missed notebooks (didn't expect test notebooks to live outside of the nbgrader/tests folder).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants