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

Memory Leak with LocalCUDACluster due to Excessive Objective Instances #1156

Open
Guinan-Su opened this issue Nov 5, 2024 · 1 comment
Open

Comments

@Guinan-Su
Copy link

Guinan-Su commented Nov 5, 2024

Hi!

When using LocalCUDACluster with worker=4, I’ve noticed a memory leak due to the repeated creation of objective instances during evaluation. Currently, it appears that each evaluation step creates a new instance without releasing memory from the old ones, which eventually leads to high memory usage.

Ideally, I’d like a way to:

  1. Limit Instance Creation: Restrict the number of objective instances to the number specified by the worker setting and reuse these old instances ? (e.g., 4).
  2. Implement a cleanup mechanism for old instances

I’ve looked through the documentation but haven’t found any existing features or configuration options that would allow this behavior. Is there an existing approach or best practice within the framework to achieve this?

Thank you for any insights or suggestions

Guinan

@benjamc
Copy link
Contributor

benjamc commented Nov 14, 2024

Hi Guinan,

by instances, do you mean the evaluation of the target function or are you doing algorithm configuration?
Can you release the memory at the end of your target function?
This sounds a bit dask/cuda related

Best wishes

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

No branches or pull requests

2 participants