Skip to content

Conversation

Crispisu
Copy link

During tutorial 4, "04-Complex-Docs.ipynb", several issues were observed on the process_batch() function.

Infinite recursion in case of exception: if the exception is thrown constantly due to various reasons, the function will run in an infinite recursive loop, because of the recursive retry (self call) inside the exception catch block => fixed by removing the recursive call and adding a max_retry attempt loop (lines 723, 748)
added batch_id in the function call since the process_batch() signature has changed (line 1242)
requests library does not offer a default timeout for method post(). If for example the Azure Search service is busy/non responsive/unavailable, then the post call will remain locked in a technical hang => fixed by adding a 30 seconds timeout (line 755)
due to issue point 1, some batches can permanently fail, therefore I have added a separate folder for failed_batches and a retry failed batches code block, which is commented with a description and guide on how to use it (line 1264)
noticed there was no description for the process_batch() => added description (line 717)

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