-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[RLlib] TF2/eager memory leak fixes. #19198
Conversation
if len(pre_batches) > 1: | ||
other_batches = pre_batches.copy() | ||
del other_batches[agent_id] | ||
else: | ||
other_batches = {} |
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.
Maybe add a comment here?
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.
Not even sure this was necessary, but our new memory leak finder was nit-picky here. I'll leave it in and add a TODO comment to remove this once confirmed it's not causing an actual leak.
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 don't actually understand why any of these would contribute to a memory leak ...
we may need better understanding / written practice of how to avoid memory leak for tf2.
let's get this commit in.
there seems to be a relevant test failure though. hey @sven1977, are all these diffs really needed? since this is a cherry-pick commit, we may want to limit the diff to only the ones that contribute to that 1GB/2M step memory leak? |
@@ -92,7 +92,7 @@ def test_ppo_compilation_and_schedule_mixins(self): | |||
config["model"]["lstm_cell_size"] = 10 | |||
config["model"]["max_seq_len"] = 20 | |||
# Use default-native keras models whenever possible. | |||
config["model"]["_use_default_native_models"] = True | |||
# config["model"]["_use_default_native_models"] = True |
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.
is this line necessary or just debugging?
TF2/eager: Memory leak fix.
Why are these changes needed?
Issue #19233
Related issue number
Closes #19233
Checks
scripts/format.sh
to lint the changes in this PR.