-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Hotfix memory leak on Python #3664
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
Changes from all commits
7c199a3
cc7a4a1
50a8e94
7bdaac5
dd71442
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -29,7 +29,10 @@ public HeuristicPolicy(Func<float[]> heuristic) | |||||||||||
public void RequestDecision(AgentInfo info, List<ISensor> sensors) | ||||||||||||
{ | ||||||||||||
StepSensors(sensors); | ||||||||||||
m_LastDecision = m_Heuristic.Invoke(); | ||||||||||||
if (!info.done) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We clear the ml-agents/com.unity.ml-agents/Runtime/Agent.cs Lines 623 to 627 in 6a11071
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I want to avoid it being called when using |
||||||||||||
{ | ||||||||||||
m_LastDecision = m_Heuristic.Invoke(); | ||||||||||||
} | ||||||||||||
} | ||||||||||||
|
||||||||||||
/// <inheritdoc /> | ||||||||||||
|
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.
Can you explain why this is necessary? How could the AgentInfos for a behavior name be in the dictionary but the list be empty?
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.
I am still investigating that part.
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.
(discussed on slack) This change sounds OK, but can you add some comments to clarify what's going on (my bad for not documenting better in the first place). Something like "Check the BrainParameters that we haven't sent yet, and add them to the InitializationOutput if we have observations for that behavior this step."