Bug with Wrapping DataLoader example

I’m working through the tutorials here: What is torch.nn really? — PyTorch Tutorials 1.7.1 documentation, specifically on the Wrapping DataLoader example. When I run the code on my end, I get the following:


TypeError Traceback (most recent call last)
in ()
40 opt = optim.SGD(model.parameters(), lr=lr, momentum=0.9)
41
—> 42 fit(epochs, model, loss_func, opt, train_dl, valid_dl)

TypeError: ‘tuple’ object is not callable

I even recopied the code from the page directly and continued to get this error. Could someone clarify this?

I just reran the tutorial on Colab without any errors.
Are you redefining the fit function somewhere?

Yes, I think I did redefine the fit function, which caused the issue. Thanks!