-
Notifications
You must be signed in to change notification settings - Fork 4.4k
[MLA-1540] Training Analytics #4780
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
288e111
WIP
89da5e3
WIP
ed114bb
side channel works
ceccf7d
send training start info
54f383b
move sidechannel to mlagents so it can import TrainerConfig, torch ve…
41a14c8
small feedback
a5bb159
gather info in sidechannel
530fbae
pass RunOptions to workers
a90eee2
debug sidechannel vars, only init sidechannel on worker0
cf56188
placeholder events
65b6e60
randomized params -> environment params
6787892
save academy caps
cf20d6d
add proto definitions for trainer events
5753637
any proto WIP
a5f1f40
Merge remote-tracking branch 'origin/master' into MLA-1540-training-a…
d7d521f
Merge remote-tracking branch 'origin/master' into MLA-1540-training-a…
75a71dd
fix proto.Any reading
c649eed
cleanup todos
f8d08ec
add meta file
f53308f
fix unit tests
954c4e8
test coverage
d1d1a7a
send events, cache trainer info
ac983b1
revert DevProject changes
f1f0c2e
apply proto patch
45cea7f
communicator version and docstrings
4265264
comments and docstring
b17f6da
Merge remote-tracking branch 'origin/master' into MLA-1540-training-a…
b15ddfd
Merge remote-tracking branch 'origin/master' into MLA-1540-training-a…
92b9d63
fix test that was added on master
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace Unity.MLAgents.Analytics | ||
{ | ||
internal static class AnalyticsUtils | ||
{ | ||
/// <summary> | ||
/// Hash a string to remove PII or secret info before sending to analytics | ||
/// </summary> | ||
/// <param name="s"></param> | ||
/// <returns></returns> | ||
public static string Hash(string s) | ||
{ | ||
var behaviorNameHash = Hash128.Compute(s); | ||
return behaviorNameHash.ToString(); | ||
} | ||
|
||
internal static bool s_SendEditorAnalytics = true; | ||
|
||
/// <summary> | ||
/// Helper class to temporarily disable sending analytics from unit tests. | ||
/// </summary> | ||
internal class DisableAnalyticsSending : IDisposable | ||
{ | ||
private bool m_PreviousSendEditorAnalytics; | ||
|
||
public DisableAnalyticsSending() | ||
{ | ||
m_PreviousSendEditorAnalytics = s_SendEditorAnalytics; | ||
s_SendEditorAnalytics = false; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
s_SendEditorAnalytics = m_PreviousSendEditorAnalytics; | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
will this cause a warning during validation?
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.
Will add some actual content there. It's internal, though, so probably not.