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

Harden user PII protection logic and extend TrainingAnalytics to expose detailed configuration parameters. #5512

Merged
merged 9 commits into from
Oct 5, 2021

Conversation

sini
Copy link
Contributor

@sini sini commented Aug 26, 2021

Proposed change(s)

  • Replace the current privacy hashing method with a more cryptographically secure method.
  • Extend the TrainingAnalytics trainer metrics to expose base configuration so hyperparameter usage can be evaluated.
  • Provide functions for properly scrubbing configuration data to ensure that no potentially user identifying data is exposed.

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Jira: https://jira.unity3d.com/browse/MLA-2179

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

Feature functionality is covered by existing test coverage. I can add additional test coverage for the PII scrubbing private methods.

@sini sini force-pushed the MLA-2179 branch 4 times, most recently from b6d46b6 to b836a91 Compare August 26, 2021 02:42
Copy link
Collaborator

@miguelalonsojr miguelalonsojr left a comment

Choose a reason for hiding this comment

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

Overall, looks good. Please address comments and also add unit tests on the C# and python side to cover these additions. The TrainingAnalyticsSideChannel class does not have any tests that I could find. I'll do a final integration test after you make the updates.

Copy link
Contributor

@dongruoping dongruoping left a comment

Choose a reason for hiding this comment

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

We should consider to find a way to encrypt all the string data entered by user since it's very likely that we add more settings containing PII in the future without updating the analytics, and the unit tests won't be able to catch that.

ml-agents/mlagents/training_analytics_side_channel.py Outdated Show resolved Hide resolved
ml-agents/mlagents/training_analytics_side_channel.py Outdated Show resolved Hide resolved
com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
@sini sini force-pushed the MLA-2179 branch 17 times, most recently from 107b4fa to c67dbdf Compare September 1, 2021 18:29
Copy link
Contributor

@maryamhonari maryamhonari left a comment

Choose a reason for hiding this comment

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

LGTM

@sini sini merged commit 37a6aa2 into main Oct 5, 2021
@delete-merged-branch delete-merged-branch bot deleted the MLA-2179 branch October 5, 2021 19:34
maryamhonari pushed a commit that referenced this pull request Nov 4, 2021
…se detailed configuration parameters. (#5512)

* Hash128 is not a cryptographic hash, replace with HMAC-SHA256.

* Extend TrainingAnalytics side channel to expose configuration details

* Change member function scopes and hash demo_paths

* Extract tbiEvent hashing method and add test coverage
maryamhonari added a commit that referenced this pull request Nov 4, 2021
…5512) harden analytics (#5604)

* Harden user PII protection logic and extend TrainingAnalytics to expose detailed configuration parameters. (#5512)

* Hash128 is not a cryptographic hash, replace with HMAC-SHA256.

* Extend TrainingAnalytics side channel to expose configuration details

* Change member function scopes and hash demo_paths

* Extract tbiEvent hashing method and add test coverage

* Fixing the analytics side-channel for curriculum learning. (#5586)

* Fixing the analytics side-channel for curriculum learning.

* Made a more robust test.

* Update the changelog.

* Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* update CHANGELOG

Co-authored-by: Jason Bowman <jasonb@unity3d.com>
maryamhonari added a commit that referenced this pull request Nov 4, 2021
* update package version from 2.0.0 to 2.0.1

* Update README.md with new survey link(#5500) (#5585)

Co-authored-by: jmercado1985 <75792879+jmercado1985@users.noreply.github.com>

* [Cherry-pick for 2.0.1 verified patch] default analytics channel (#5511) (#5584)

* update changelog from #5511

* set gym=0.20.0 #5540, update changelog

* Cap cattrs version for now(#5397)

* clean up

Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
Co-authored-by: Ruo-Ping Dong <ruoping.dong@unity3d.com>

* Cherry picking #5283 and #5519 into 2.0.1-verified-patch to fix gRPC for mac m1 (MLA 2259) (#5602)

* Only update the native library and the c# calls that need to be made to clean up channels. (#5283)

* Fix Mac backcompat test (#5519)

Co-authored-by: Chris Goy <christopherg@unity3d.com>

* [Cherry-pick for 2.0.1 verified patch]Harden user PII in analytics (#5512) harden analytics (#5604)

* Harden user PII protection logic and extend TrainingAnalytics to expose detailed configuration parameters. (#5512)

* Hash128 is not a cryptographic hash, replace with HMAC-SHA256.

* Extend TrainingAnalytics side channel to expose configuration details

* Change member function scopes and hash demo_paths

* Extract tbiEvent hashing method and add test coverage

* Fixing the analytics side-channel for curriculum learning. (#5586)

* Fixing the analytics side-channel for curriculum learning.

* Made a more robust test.

* Update the changelog.

* Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* update CHANGELOG

Co-authored-by: Jason Bowman <jasonb@unity3d.com>

Co-authored-by: jmercado1985 <75792879+jmercado1985@users.noreply.github.com>
Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
Co-authored-by: Ruo-Ping Dong <ruoping.dong@unity3d.com>
Co-authored-by: Jason Rupert <92821409+jrupert-unity@users.noreply.github.com>
Co-authored-by: Chris Goy <christopherg@unity3d.com>
Co-authored-by: Jason Bowman <jasonb@unity3d.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants