fastai / fastcore

Python supercharged for the fastai library
http://fastcore.fast.ai
Apache License 2.0
973 stars 276 forks source link

NameError: name 'union2tuple' is not defined #526

Closed truongphanduykhanh closed 1 year ago

truongphanduykhanh commented 1 year ago

In the notebook "Is it a bird? Creating a model from your own data" (the first lecture in FastAI course) in Kaggle, I ran fastcore.all import L and got error NameError: name 'union2tuple' is not defined.

Here is the result when I check the library version !pip show fastcore:

Name: fastcore
Version: 1.5.29
Summary: Python supercharged for fastai development
Home-page: https://github.com/fastai/fastcore/
Author: Jeremy Howard and Sylvain Gugger
Author-email: infos@fast.ai
License: Apache Software License 2.0
Location: /opt/conda/lib/python3.7/site-packages
Requires: packaging, pip
Required-by: fastai, fastdownload

I have tried to reinstall the library but didn't work. Someboby has raised this issue in fastai/fastai repository but didn't get the resolve https://github.com/fastai/fastai/issues/3740

truongphanduykhanh commented 1 year ago

The issue was resolved when I restarted the session and run the notebook from the beginning. Don't know why it works.