Notebook and notebook exports mismatch caused headaches


I haven’t seen anything mentioned about this anywhere. Maybe I missed the memo. I’m sure someone will tell me if this is common knowledge. Anyways, this cost me a good bit of time, but that probably says more about my debugging skills than it does about the nature of the problem itself. :smile: I hope this will help someone else.

So, for anyone wondering: The notebook export scripts, exp/nb_*.py, contain minor changes not reflected in the notebooks themselves. Meaning, if you run at the end of the notebook, (like I evidently do) you will override necessary code changes. So, if you are getting weird errors when you run your code, this might be the cause. Just git clone the repo again and you should be good to go.

The changes that led to my discovery of this were in, and, but I’m guessing there are more. In 05b, there was a line added to the beginning of the Runner __init__ method: self.in_train = False. In 05, there was a function added: cos_1cycle_anneal. I checked the latest version on github, and both of these still exist.

I’m sorta curious as to why these changes weren’t simply added to the notebooks themselves. It would have made my last hour or so a lot more productive. In my ignorance of any reason/purpose for the mismatch, I advocate that the notebooks and their export scripts be made identical.

To cure my ignorance: does anyone know why this is?


Lesson 11 discussion and wiki
Running the Lesson 11 notebook 08_data_block.ipynb
(James Lou) #2

Thank you. I got the same problems when I run the notebook.

1 Like

(Vinod Nair) #3

Thank you @exynos7 this was helpful, saved my time!