I currently having a simple issue where untar_data is not extracting into the folder I am expecting.
I want to know how to enable source debugging or step-through for the FastAI library so I can better understand its inner workings.
Simple code but I want to step into this and trace it through.
data_path = Path(‘data’)
os.makedirs(data_path, exist_ok=True)
path = untar_data(URLs.CAMVID_TINY, data=data_path , force_download=True)
Hello,
m glad you’re enjoying the course! Let’s get you set up for debugging the untar_data function in the FastAI library.
To enable source debugging or step-through for FastAI, you can use Python’s built-in pdb module or an IDE like Visual Studio Code (VS Code) or PyCharm, which have integrated debugging tools. Here’s a step-by-step guide using pdb:
Import the pdb module:
Python
import pdb
Set a breakpoint before the untar_data call:
Python
os.makedirs(data_path, exist_ok=True)
pdb.set_trace() # This will start the debugger
path = untar_data(URLs.CAMVID_TINY, data=data_path, force_download=True)
Best Regards
esther598