Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseConverter more robust and reliable when processing thousands of files. #6665

Closed
dannybusch opened this issue Dec 30, 2023 · 3 comments · Fixed by #6930
Closed

BaseConverter more robust and reliable when processing thousands of files. #6665

dannybusch opened this issue Dec 30, 2023 · 3 comments · Fixed by #6930
Labels
1.x Contributions wanted! Looking for external contributions type:enhancement

Comments

@dannybusch
Copy link

dannybusch commented Dec 30, 2023

Is your feature request related to a problem? Please describe.
I'm always frustrated when a conversion suddenly breaks the whole pipeline, especially when processing thousands of files. Imagine importing like 2500 PDF files into an object store via Tika- or PDF-converter. When there is one corrupt PDF or something else goes wrong, an exception is raised breaking the whole process. Of course, typically this happens after one hour has passed and 75% already have been processed.

Describe the solution you'd like
Don't break the whole pipeline or conversion process as soon as there is one exception occuring for whatever reason.

Version: 2.x

@masci masci added 2.x Related to Haystack v2.0 1.x and removed 2.x Related to Haystack v2.0 labels Jan 8, 2024
@anakin87 anakin87 added the type:feature New feature or request label Feb 6, 2024
@anakin87
Copy link
Member

anakin87 commented Feb 6, 2024

Potential solution

Assuming we are talking of 1.x (the BaseConverter is only available in 1.x), this does not seem difficult to achieve.
We can add a raise_on_failure parameter in the run method of the BaseConverter.

  • if True (default), raises an exception if the conversion of a single file fails (current behavior)
  • if False, skips the file without failing

Since the run method is present only in the BaseConverter, it would be necessary to modify only the latter and not the specific converters.

I will put the tag "Contributions wanted" on this issue. @dannybusch feel free to open a PR...

@anakin87 anakin87 added type:enhancement Contributions wanted! Looking for external contributions and removed type:feature New feature or request labels Feb 6, 2024
@isaac-chung
Copy link

@anakin87 drafted a PR for this issue. Which branch should I rebase it to? (got quite a big conflict at the moment).

@anakin87
Copy link
Member

anakin87 commented Feb 7, 2024

fixed in #6930 thanks to @isaac-chung!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Contributions wanted! Looking for external contributions type:enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants