Skip to content

Fix memory leak: reuse existing subtensor connection in set_weights#63

Open
Mahdi3Bani wants to merge 1 commit intoNickel5-Inc:mainfrom
Mahdi3Bani:fix-subtensor-connection-leak
Open

Fix memory leak: reuse existing subtensor connection in set_weights#63
Mahdi3Bani wants to merge 1 commit intoNickel5-Inc:mainfrom
Mahdi3Bani:fix-subtensor-connection-leak

Conversation

@Mahdi3Bani
Copy link
Copy Markdown

Previously, a new subtensor WebSocket connection was created on every call to set_weights(), causing connection leaks and 2.4GB+ memory bloat. Now reuses the existing self.subtensor connection passed during init, with a fallback to create a new one only if the existing connection is None.

Fixes #61

Previously, a new subtensor WebSocket connection was created on every
call to set_weights(), causing connection leaks and 2.4GB+ memory bloat.
Now reuses the existing self.subtensor connection passed during init,
with a fallback to create a new one only if the existing connection is None.

Fixes Nickel5-Inc#61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak: New subtensor connection created on each weight setting instead of reusing existing one

1 participant