Skip to content

Conversation

Chandrababu-Namani
Copy link

@Chandrababu-Namani Chandrababu-Namani commented Jan 25, 2024

I encountered an issue in the prepare_data.py where an index out-of-bounds error occurs. After investigating, I found that the line causing the error is:
f = (f + 1) % 5
Because, it only works well when we do 5 fold cross validation.
To fix this issue and avoid the out-of-bounds error, I suggest updating the line to use a variable docs_per_fold instead of the hardcoded value 5:
f = (f + 1) % docs_per_fold

I encountered an issue with this line where an index out-of-bounds error occurs. 
To fix this issue and avoid the out-of-bounds error, I suggest updating the line to use a variable docs_per_fold instead of the hardcoded value 5:
f = (f + 1) % 5 to f = (f + 1) % docs_per_fold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant