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

[Serve] Address incremental memory leak due to _PyObjScanner #31317

Merged
merged 1 commit into from
Dec 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/ray/dag/dag_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def _get_all_child_nodes(self) -> List["DAGNode"]:
):
if n not in children:
children.append(n)
scanner.clear()
return children

def _apply_and_replace_all_child_nodes(
Expand Down Expand Up @@ -210,6 +211,7 @@ def _apply_and_replace_all_child_nodes(
new_args, new_kwargs, new_other_args_to_resolve = scanner.replace_nodes(
replace_table
)
scanner.clear()

# Return updated copy of self.
return self._copy(
Expand Down Expand Up @@ -288,6 +290,7 @@ def apply_functional(
replace_table[node] = apply_fn(node)

replaced_inputs = scanner.replace_nodes(replace_table)
scanner.clear()

return replaced_inputs

Expand Down