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

High CPU utilization with sklearn, function never returns #86

Open
jeremiahcompass opened this issue Dec 10, 2021 · 2 comments
Open

High CPU utilization with sklearn, function never returns #86

jeremiahcompass opened this issue Dec 10, 2021 · 2 comments

Comments

@jeremiahcompass
Copy link

Hello and thanks for Colima.
I found an issue today where using the SciKit Learn (v0.18.2) Linear Regression fit causes high CPU utilization (around 100%-200%) on the container and doesn't complete. So far we've reproduced the issue on 3 developer's systems running Colima 0.2.2 (MacBook Pros Intel CPU) and verified the function returns quickly (<3ms) when running the container with Docker Desktop.
I also reproduced the issue on

colima version HEAD-e1df012
git commit: e1df01257a5aa73a373e04f965d803697df41564

runtime: docker
arch: x86_64
client: v20.10.11
server: v20.10.7`

Here's the python we are running to repro the issue:

import sklearn.linear_model
import time

source_points = [(0.22568627446889877, 0.055740684270858765), (0.12333333119750023, 0.8582248091697693), (0.20058824121952057, 0.9266889095306396)]
target_points = [(0.25509804487228394, 0.9863677620887756), (0.25509804487228394, 0.9863677620887756), (0.25509804487228394, 0.9863677620887756)]

linear_regressor = sklearn.linear_model.LinearRegression()

start = time.monotonic()
linear_regressor.fit(source_points, target_points)
print(f'It took {((time.monotonic() - start) * 1_000_000):.0f}μs')
@abiosoft
Copy link
Owner

@jeremiahcompass is this running on a mounted volume? How much resources (cpu, ram) is allocated to the VM?

@jeremiahcompass
Copy link
Author

@abiosoft Yes, we're using a mounted volume. At first I was using the default CPUs and RAM, then I tried 4 CPUs and 16GB ram with the same result.

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