I have initialised a new nbdev repo and the “test” yaml / workflow is failing. I can’t seem to decipher anything useful from the logs either.
Would appreciate any hints, since I am sure others have encountered this error before. Here’s the run: Initial commit · gautam-e/get-embeddings@b232a0f · GitHub
I have initialised a new nbdev repo and the “test” yaml / workflow is failing. I can’t seem to decipher anything useful from the logs either AarpMembership
Would appreciate any hints, since I am sure others have encountered this error before. Here’s the run: Initial commit · gautam-e/get-embeddings@b232a0f · GitHub
I can help with that! Here are some common steps to troubleshoot issues with a failing nbdev workflow:
-
Check YAML Configuration: Make sure your .github/workflows/ci.yml file is set up correctly. Common issues include incorrect indentation or syntax errors.
-
Inspect Log Output: Look for specific error messages in the workflow logs. While they can be cryptic, they often point to the underlying issue.
-
Dependencies: Ensure that all necessary dependencies are listed in requirements.txt and are correctly installed in your environment. Sometimes missing packages can cause tests to fail.
-
Tests: If you’ve written tests, ensure they are functioning properly locally. You can run them in your local environment with nbdev_test_nbs.
-
File Structure: Confirm that your notebook files are in the correct structure and that your settings.ini file is correctly configured.
-
Kernel Issues: Check if the notebooks are using the correct kernel. Sometimes, if the kernel isn’t available in the CI environment, tests can fail.
-
GitHub Secrets: If your workflow relies on any secrets (like API keys), make sure they are set up correctly in your repository settings.
-
Look at Previous Runs: If you’ve run the workflow multiple times, check previous runs for any hints or patterns in the failures.
I’m having the same issue, not sure what the problem is, I wouldn’t know where to even begin.
I fixed it a while back but can’t remember the exact fix! Basically the template isn’t meant to work right out of the box.
Hope that helps. I can have a look later if it doesn’t.
Running nbdev_clean
locally from both within the nbdev-hello-world repo base, and within the /nbs folder fixed the issue.
I’m not sure if it’s required to be run in both, but that’s what I did, and the problematic file nbs/index.ipynb was updated for a git commit
The hint was indeed right there in the log of the CI test failure for both yours and mine.
M nbs/index.ipynb
Which indicates that the workflow detected index.ipynb was modified after it ran nbdev_clean.
While I was able to read the log initially and suspect that !!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_hooks
was likely important, I wasn’t 100% sure, and I didn’t know how to fix it, as I had already run nbdev_install_hooks
and nbdev_export
locally a couple of times.
Maybe nbdev_clean
should be added as a suggestion in this error message, or in the tutorial. Or maybe this means nbdev_install_hooks
isn’t working as it should for me.