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

PIIAnonymizer not generating multiple locales #447

Closed
pvk-developer opened this issue Mar 22, 2022 · 0 comments
Closed

PIIAnonymizer not generating multiple locales #447

pvk-developer opened this issue Mar 22, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pvk-developer
Copy link
Member

Environment Details

  • RDT version: v1.0.0.dev
  • Python version: 3.7
  • Operating System: PopOS! 20.04

Error Description

The current PIIAnonymizer does not work properly with the multiple locales passed. When we store the function provided by the user, we do not store the proxy function but the result of this, which leads to have a static generator instead of multiple one.

Steps to reproduce

import pandas as pd

from rdt.transformers import PIIAnonymizer

data = pd.DataFrame({'my_row': np.arange(0, 100)})
piia = PIIAnonymizer(provider_name='job', function_name='job', locales=['ar_AA', 'en_US'])

transformed = piia.fit_transform(data, 'my_row')
reverse_transformed = piia.reverse_transform(transformed)

The reverse_transformed object is expected to contain both Arabic and English job titles, but this will be random and only contain one of them (only English or only Arabic).

@pvk-developer pvk-developer added the bug Something isn't working label Mar 22, 2022
@pvk-developer pvk-developer added this to the 1.0.0 milestone Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants