Dealing with "Detected difference between the notebooks and the library"

CI build gives this error (stack stace below)

Run if [ -n "$(nbdev_diff_nbs)" ]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi
  if [ -n "$(nbdev_diff_nbs)" ]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.6.10/x64
!!! Detected difference between the notebooks and the library
##[error]Process completed with exit code 1.

I remove the contents of library, ran nbdev_clean_nbs. Still the issue is not resolved. How can this error be fixed ?

@sgugger, could you please provide some comments on how to fix this?

You need to upgrade to the latest version of nbdev, run an nbdev command (like nbdev_clean_nbs) and recommit.

I am using 0.2.18 version. At the end after build_lib, test_nbs and build_doc, I ran clean_nbs, the build is still failing with the same error. What am I missing ?

Are you sure you pushed all the changes (e.g. you don’t have one file missing on your GitHub)?

Yes, I push all the files. If you require, you can have a look at the repo here. Not sure what’s the reason.

Could you please tell me if there’s something else which can be done ? I’m thinking of removing this test from the config file.

I have no time to look at this right now, being on a book deadline. If you have a clean nbdev_diff_nbs locally this shouldn’t happen, as long as nbdev is at its most recent version.

Okay, thanks.