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

Add ML detection strategy to PII detection guardrail #292

Merged
merged 15 commits into from
Aug 1, 2024

Conversation

minmin-intel
Copy link
Collaborator

Description

Add a second strategy to the pii detection guardrail microservice where a logistic regression classifier is used to detect PIIs.

Issues

NA

Type of change

  • New feature (non-breaking change which adds new functionality)

Dependencies

scikit-learn

Tests

microservice-level unit test. see the script run_test.sh

@minmin-intel
Copy link
Collaborator Author

@xuechendi @XuhuiRen @ftian1 Please review. Thanks!

@xuechendi xuechendi requested review from xuechendi, ftian1, XuhuiRen and chensuyue and removed request for ftian1 July 10, 2024 22:46
@xuechendi
Copy link
Collaborator

@minmin-intel , test bash script is located here: https://github.com/opea-project/GenAIComps/blob/main/tests/test_guardrails_pii_detection.sh

you can move content of run_test.sh to above file

@minmin-intel
Copy link
Collaborator Author

@minmin-intel , test bash script is located here: https://github.com/opea-project/GenAIComps/blob/main/tests/test_guardrails_pii_detection.sh

you can move content of run_test.sh to above file

Thanks for pointing this out! I have moved the tests to test_guardrails_pii_detection.sh

@xuechendi
Copy link
Collaborator

hello, @minmin-intel , UT failed, I think you hard coded IP addr?

image

@chensuyue chensuyue requested a review from letonghan July 18, 2024 14:05
Copy link
Collaborator

@xuechendi xuechendi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@minmin-intel minmin-intel merged commit de27e6b into opea-project:main Aug 1, 2024
7 checks passed
sharanshirodkar7 pushed a commit to predictionguard/pg-GenAIComps that referenced this pull request Aug 7, 2024
* first code of business safety classifier

* allow strategy options and update readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* disable ray for ml strategy and update test script

* add log to pii test

Signed-off-by: minmin-intel <[email protected]>

* update logging in test gaurdrail

* rm llm strategy and change url in test

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* delete file check in test and update readme

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: minmin-intel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: chen, suyue <[email protected]>
Signed-off-by: sharanshirodkar7 <[email protected]>
lkk12014402 pushed a commit that referenced this pull request Aug 8, 2024
BaoHuiling pushed a commit to siddhivelankar23/GenAIComps that referenced this pull request Aug 15, 2024
* first code of business safety classifier

* allow strategy options and update readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* disable ray for ml strategy and update test script

* add log to pii test

Signed-off-by: minmin-intel <[email protected]>

* update logging in test gaurdrail

* rm llm strategy and change url in test

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* delete file check in test and update readme

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: minmin-intel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: chen, suyue <[email protected]>
Signed-off-by: BaoHuiling <[email protected]>
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.

4 participants