[Bug] tito module complete uses src code instead of module code
Area
Book — Volume I
Location
All Modules
Description
Behavior:
When running tito module complete 03 I got unit test errors even though my all my code passed in my notebook. Upon further look I noticed the line src_dir = project_root / 'src' in function _discover_modules() in modules.py looks for modules in src instead of the notebook generated code in modules. As a result, there is an extra parameter in the example solution, requires_grad, that is declared but not implemented in module 01 causing tito complete 03 to fail. I confirmed this by writing an explicit error within my notebook, saved, and still passed tito complete 04. Is this behavior intended?
Proposed solution: Use 'modules' directory in _discover_modules() to look at notebook generated code for unit/integration testing.
Expected Behavior
No response
Environment (TinyTorch bugs only)
No response
Source: harvard-edge/cs249r_book