question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

different hashing in release_feedback and fetch_feedback

See original GitHub issue

Operating system

Ubuntu 20.04.5 LTS

nbgrader --version

0.8.0

jupyterhub --version (if used with JupyterHub)

2.3.1

jupyter notebook --version

6.4.12

jupyter lab --version

3.4.6

Expected behavior

same result from notebook_hash in release_feedback.py and fetch_feedback.py

Actual behavior

different results, resulting in [FetchFeedbackApp | WARNING] Could not find feedback for ... during nbgrader fetch_feedback --debug

Steps to reproduce the behavior

As instructor do nbgrader release_feedback --debug <assignment>. Then as student do nbgradere fetch_feedback --debug <assignment>.

Explanation

We are using nbgrader with jupyterhub and jupyter lab for one of our courses much to our liking. For several months all was working well but very recently we stumbled on the following incident. Two students (of 20) are not able to fetch the feedback of one particular assignment.

After some debugging I found that the hash in release_feedback.py was generated with different values than in fetch_feedback.py:

nbgrader release_feedback --debug 'Assignment 3 Wavefront sensing

[ReleaseFeedbackApp | DEBUG] nbfile is: /home/grader-ap3122/ap3122/submitted/<username>/Assignment 3 Wavefront sensing/Assignment Wavefront aberrations.ipynb
[ReleaseFeedbackApp | DEBUG] Unique key is: ap3122+Assignment 3 Wavefront sensing+Assignment Wavefront aberrations+<username>+2022-11-11 15:17:36.574853 UTC
[ReleaseFeedbackApp | DEBUG] checksum is: f9990f2f5f029af5091cbc417c5a591e
[ReleaseFeedbackApp | DEBUG] dest is: /usr/local/share/nbgrader/exchange/ap3122/feedback/f9990f2f5f029af5091cbc417c5a591e.html

nbgrader fetch_feedback --debug 'Assignment 3 Wavefront sensing

[FetchFeedbackApp | DEBUG] notebook is: /data/jupyterhub/home/<username>/.local/share/jupyter/nbgrader_cache/ap3122/<username>+Assignment 3 Wavefront sensing+2022-11-11 15:17:36.574853 UTC/Assignment Wavefront aberrations.ipynb
[FetchFeedbackApp | DEBUG] Unique key is: ap3122+Assignment 3 Wavefront sensing+Assignment Wavefront aberrations+<username>+2022-11-11 15:17:36.574853 UTC
[FetchFeedbackApp | DEBUG] nb_hash is: 209d0cfb1a1a05ba8d64273f2fd04271
[FetchFeedbackApp | DEBUG] feedbackpath is: /usr/local/share/nbgrader/exchange/ap3122/feedback/209d0cfb1a1a05ba8d64273f2fd04271.html

the student name has been replaced with <username>

I’ve added some debugging code to the two python-scripts logging the values of the appropriate variables

Clearly the nbfile and notebook have very different value resulting in different hash values. This is reflected in the different values of dest and feedbackpath which should be the same.

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
perllaghucommented, Dec 14, 2022

Ah… my apologies - I miss-read the original.

Let me have a look-see - I would be surprised if this was not just two different names for the same string… but I’ll check

0reactions
ykazakovcommented, Dec 21, 2022

@ronligt We have experienced a similar problem, which could be traced to the following situation:

  • students produce corrupted notebooks, e.g., by deleting or duplicating answer cells
  • nbgrader refuses to auto-grade such submissions, so instructors “fix” the submitted versions of the students (copied from the exchange)
  • the feedback is generated against the modified submission, so students could not fetch feedback because of the different hash value, which is a part of the feedback file name (students are not permitted to list files in the exchange directory, but if they “know” the file name of the feedback, they can copy it)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Hash Tables, Hashing and Collision Handling - Medium
The hash function can produce an index that has already been used in the table, which is called a collision. We will discuss...
Read more >
Why Hash Values Are Crucial in Evidence Collection & Digital ...
If the hash values for the original and copy are the same, it is highly improbable that the original and copy are not...
Read more >
What Is Hashing? When To Use It and How It Works - Indeed
Hashing is converting a key into another value or a code. The hash function, otherwise known as the algorithm, takes a large block...
Read more >
Difference between Indexing and Hashing in DBMS
It is generally used to index and retrieve items in database as it is faster to ... Types of hashing includes static and...
Read more >
A Review of Hashing Methods for Multimodal Retrieval
This review clarifies the definition of multimodal retrieval ... modality, then it can retrieve its other modal data through hash.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found