The bugs themselves weren't that hard once I found them.
First, run the script to observe the actual error and traceback, then systematically debug each issue by reading the error messages and inspecting the relevant code sections. Fix one bug at a time, re-running the script after each fix to confirm progress and avoid introducing new errors. Prioritize bugs that block execution (e.g., syntax, shape mismatches) before those affecting performance or correctness.
Pro tip: Use print statements or a debugger to inspect tensor shapes and data types at key points; many ML bugs stem from shape mismatches or incorrect data preprocessing. Also, keep track of time—if stuck on one bug for more than 10 minutes, move to the next and return later with fresh eyes.
Execute the script and carefully read the error message and traceback to identify the first failure point. Note any warnings or unexpected outputs that might hint at other bugs.
For each error, locate the relevant code lines and reason about the root cause. Check for common ML bugs: shape mismatches, incorrect loss functions, data leakage, or wrong hyperparameters.
Make minimal fixes (1-2 lines) and re-run the script to confirm the error is resolved. Ensure the fix doesn't break other parts of the code.
Repeat steps 1-3 for each bug until the script runs without errors. Finally, validate that training completes and metrics (e.g., loss decreases) are reasonable.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.