Skip to content

fix: llm labeling path creation#40

Merged
leomaurodesenv merged 1 commit intomainfrom
fix/labeling-llm
Aug 5, 2025
Merged

fix: llm labeling path creation#40
leomaurodesenv merged 1 commit intomainfrom
fix/labeling-llm

Conversation

@leomaurodesenv
Copy link
Owner

🐛 Fix: LLM Labeling Path Creation

Issue

The labeling script was failing with an IsADirectoryError when trying to save CSV files because the code was attempting to create a directory with the full file path instead of just the parent directory.

Root Cause

  • Line 141 in src/labeling_llm/module.py was calling Path(output_file).mkdir(parents=True, exist_ok=True)
  • This tried to create a directory named basketball-qa-labeling.csv instead of the actual directory structure

Solution

  • Changed Path(output_file).mkdir(parents=True, exist_ok=True) to Path(output_file).parent.mkdir(parents=True, exist_ok=True)
  • Now correctly creates the parent directory structure (e.g., output/labeling/qwen/) before writing the CSV file

Testing

  • ✅ Verified the fix resolves the IsADirectoryError
  • ✅ Confirmed CSV files are now saved correctly to the intended directory structure

Files Changed

  • src/labeling_llm/module.py

@leomaurodesenv leomaurodesenv self-assigned this Aug 5, 2025
@leomaurodesenv leomaurodesenv added the fix This is a fix for some unwanted behavior label Aug 5, 2025
@leomaurodesenv leomaurodesenv merged commit 8759d02 into main Aug 5, 2025
1 check passed
@leomaurodesenv leomaurodesenv deleted the fix/labeling-llm branch August 5, 2025 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix This is a fix for some unwanted behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant