WHY The Changes?

Why does the code keep changing? If I type something in from page 70 of the book, I get errors… Invalid Syntax "splitter=RandomSplitter(validpct=0.3,seed=42).
Then I also found out that under Stochastic Gradient Descent (page 161) has the following outdated code: “params.data=lr * params.grad.data” where the .data throws an error.

This stuff is hard enough to learn without someone pulling the rug out from under me!!! Can we please get some kind of governance on this issue and have a stable format?

I haven’t programmed in a long, long time. I started with BASIC back in the 1980’s. Basic didn’t change that much. It was a stable programming language. Sure, there were and there are, different versions. But there were not such MAJOR changes in the coding.

Is this the current state of things? If so, count me out. That is ridiculous!

Why create a book with your time, sweat, money, labor, etc. just to have its pages be invalid by printing time??

Sorry just ranting. Anyone else?

1 Like

Hi,

I’d suggest to use the code from the fastbook repository (https://github.com/fastai/fastbook). I am pretty sure that the code in the repo is beeing updated when the library changes.

Another solution would be to use the fastai version when the book was published pip install fastai==<version you'd like to use>. That way the code from the printed book should work.

Florian

1 Like

Thanks Florianl, I appreciate the suggestions. I will try these out.