-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat(openadapt.privacy.providers): add private_ai as a scrubbing provider #486
Conversation
Now, add tests for text, pdf and image scrubbing using private ai |
Now, if there is some issue with PRIVATE_AI_API_KEY (not valid or not present) then all then tests in test_private_ai_scrub.py get skipped. See how it will look:
|
@abrichr Addressed all of your comments! Ready for merging |
Once this is merged, please see: #418 (comment), #330 (comment) |
@abrichr I have addressed your comments again, to use BytesIO wherever possible. Here is how pytest looks like after all:
Ready for merging! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…ider (OpenAdaptAI#486) * ran black * add blank file for priavte ai * add class `PrivateAIScrubbingProvider` * add pvt_ai api key in config * ran `pre-commit run --all` * add scrub_text function * progress for image redaction * format * complete scrub_image * start scrub_pdf * add pdf redaction code * add more wrapper for invalid reponse from priavate ai * try to fix pytest * try to fix pytest * remove lst * remove uncessary methods * text scrubbing test all passses * pdf_redaction test works * add test_image_redaction test in pyetst * add easy ocr to poetry * pytest is fixed * remove versino files * remove un-neccasry files * add code to remove uncessary files after pytest * addressed OpenAdaptAI#486 (comment) * address comment OpenAdaptAI#486 (comment) * reduce line chars * addressed comment: OpenAdaptAI#486 (comment) * fix flake8 * use f strings * address comment: OpenAdaptAI#486 (comment) * address comment: OpenAdaptAI#486 (comment) * change to value error * remove .keys() * add constants * fix flake8 erros * use BytesIO * address comment OpenAdaptAI#486 (comment) * rna black * final commit * remove unused code * refactor typo * rename `redact_file_path` to `redacted_file_path` * use BytesIO wherever possible * fix flake8 * add documentation links * Apply suggestions from code review * Update tests/openadapt/privacy/providers/test_private_ai_scrub.py * fix poetry.lock * poetry.lock --------- Co-authored-by: Krish Patel <[email protected]> Co-authored-by: Richard Abrich <[email protected]> Co-authored-by: Richard Abrich <[email protected]>
What kind of change does this PR introduce?
Add PrivateAI as Scrubbing Provider.
Summary
Motivation: #418 (comment)
Checklist
How can your code be run and tested?
Other information