Comments (15)
We are thinking about this in dask/distributed#2118 and dask/distributed#2208 (comment).
But we didn't talk about adaptive part yet ("scale them according to what the client requests"), which would probably need modifications too.
from dask-kubernetes.
I think that this seems like a reasonable request. I think that it would require additional logic to the Adaptive
class that looked at resources when making requests. It's non-trivial work, but seems reasonably in-scope.
from dask-kubernetes.
from dask-kubernetes.
I'd be happy to help here, but I don't really know how to... I've never used KubeCluster
yet, but I'm planning to give it a go in the next few months. From my limited point of view, I'd like to be able to easily specify my worker size when initializing a cluster, so if this is not easily possible yet, an improvement would be welcome.
One thought: does or may this affect Cloud VM flavor also? Are these hard coded in another place when defining the Kubernetes cluster? It will be good if by specifying cpu, mem, and perhaps flavor, the automatically created VM are adapted to those.
from dask-kubernetes.
@guillaumeeb you currently specify the whole worker config when you initialise the cluster and can configure everything from resources to docker image.
The admin of the cluster can also specify a default config to use if the user doesn't specify one. This issue is discussing how to make tweaks to resources in the default config on the fly without having to specify a whole new config.
from dask-kubernetes.
@jacobtomlinson does Kubernetes chose by itself the machine type to use according to what is specified in the pod spec? Looking at http://dask-kubernetes.readthedocs.io/en/latest/#quickstart, I don't see anything like n1-standard-2
or another flavor.
Sorry if this is a dumb question, I still need to learn how Kubernetes is working.
from dask-kubernetes.
from dask-kubernetes.
So looking at core.py, currently the easiest way to do what you say is to use the following method:
pod_spec = make_pod_spec(image='daskdev/dask:latest',
memory_limit='4G', memory_request='4G',
cpu_limit=1, cpu_request=1,
env={'EXTRA_PIP_PACKAGES': 'fastparquet git+https://github.com/dask/distributed'})
Which implies that you understand all the rest.
Again I've only a limited view of all this, but it sounds like it would be a welcome functionality here. The way I would do that is to add your update methods or an equivalent, and call that in the __init__
with associated kwargs, just after pod_template
is secured, somewhere here https://github.com/dask/dask-kubernetes/blob/master/dask_kubernetes/core.py#L174, or below.
Updating after creation looks like and edge case to me, this is not what we are doing in dask-jobqueue. But I can understand in some situation you might want to do this.
from dask-kubernetes.
Yes I agree that updating it after creating is an edge case. Perhaps a better way would be to allow users to call make_pod_spec
with missing kwargs that get filled in from the defaults.
E.g
pod_spec = make_pod_spec(memory_limit='4G', memory_request='4G',
cpu_limit=1, cpu_request=1)
In this example the image and extra packages would come from the default. There is no reason why a scientist should even know what a docker image is.
from dask-kubernetes.
Not sure it's such an edge case. It's possible to think about running a single dask scheduler for multiple tasks, each of which may have a slightly different set of arguments/variables.
from dask-kubernetes.
@mturok interesting point. However the example I put above would modify the scheduler which would not be great for multi-use clusters.
from dask-kubernetes.
As long as the pods get created with matching values, there should be no pathological cases.
from dask-kubernetes.
Quick question, that may be related to this issue.
Would it be possible to use multiple pod specs and scale them according to what the client
requests?
Like the use case described here for the pure dask distributed.
client.submit(process, d, resources={'GPU': 1})
The main use case is to have some instances with GPUs and others without, and use them as needed.
I guess this would require another scheduling layer to fit the work in the smallest pool possible, plus some logic for when a pool is maxed out but the other one is not.
from dask-kubernetes.
That is an interesting idea but would involve upstream changes in dask and distributed. For now I would just create multiple clusters.
@mrocklin I'm sure you are very busy at the moment do you have any thoughts on this?
from dask-kubernetes.
As work is ongoing in the issues that @guillaumeeb mentioned and much of the scaling logic in dask-kubernetes has been replaced with SpecCluster
from distributed I'm going to close this in favour of dask/distributed#2118 in particular.
from dask-kubernetes.
Related Issues (20)
- Allow graceful shutdown HOT 3
- Dask dashboard not loading HOT 4
- Env var duplication HOT 2
- Ability to add different scheduler address to workers outside of standard format HOT 2
- Add a Changelog HOT 4
- Cluster creation constantly failing because of existing scheduler in "Terminating" status HOT 3
- Does dask-kubernetes compatible with newer version of k8rs? HOT 4
- Can not connect to k8s websocket deployed in Rancher HOT 5
- Update dask-kubernetes to a newer kr8s HOT 4
- Add Python 3.12 support HOT 1
- TOCTOU Bug while scaling down workers HOT 5
- Worker RestartPolicy not setable HOT 2
- Dask cluster creation issue with TLS HOT 1
- KubeCluster is shut down automatically even if shutdown_on_close is False HOT 1
- Go code failing to lint
- Dask Cluster with name longer than 53 chars is stuck in Created state, cannot be deleted
- Cannot Overwrite DASK_SCHEDULER_ADDRESS in Worker env HOT 1
- ConnectionClosedError during Dask Cluster Creation with k8s HOT 1
- Missing idleTimeout key in daskcluster_autoshutdown HOT 8
- Add IngressSpec besides ServiceSpec to Scheduler HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dask-kubernetes.