Git Product home page Git Product logo

Comments (20)

mrocklin avatar mrocklin commented on May 28, 2024

We might also consider having separate yaml files sge.yaml, slurm.yaml, pbs.yaml

from dask-jobqueue.

jhamman avatar jhamman commented on May 28, 2024

That would also be a reasonable choice. Open to ideas here.

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

It would be good to come to a decision here soonish. I think that this is the sort of issue might reasonably block the release of Dask proper. dask/dask#3592

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

I'm currently in favor of separate files

from dask-jobqueue.

jhamman avatar jhamman commented on May 28, 2024

I'm fine with separate files. @lesteve and @guillaumeeb, any thoughts here?

from dask-jobqueue.

guillaumeeb avatar guillaumeeb commented on May 28, 2024

I don't have a strong opinion on this. If separated files, we should still keep some 'jobqueue' prefix, don't you think?
What will be the impact in the code? Each Cluster implementation will use all the keywords by default?

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

from dask-jobqueue.

guillaumeeb avatar guillaumeeb commented on May 28, 2024

I just find it weird to have a .config/dask directory that looks like this:

distributed.yaml
dask.yaml
pbs.yaml
sge.yaml

I would prefer a more explicit naming (and more consistent with other packages):

distributed.yaml
dask.yaml
jobqueue-pbs.yaml
jobqueue-sge.yaml

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

Hrm, in trying to do this we now have to repeat all keyword arguments in all constructors. Are we ok with this? Also, what should we do for things like MOAB?

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

I'm also now against the idea of splitting into multiple files, especially as more job schedulers come online.

from dask-jobqueue.

jhamman avatar jhamman commented on May 28, 2024

What if we implemented some basic inheritance?

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

Sorry, let me be more explicit. Currently the core superclass constructor looks like this

class JobQueueCluster(Cluster):
    def __init__(self,
                 name=dask.config.get('jobqueue.name'),
                 threads=dask.config.get('jobqueue.threads'),
                 processes=dask.config.get('jobqueue.processes'),
                 memory=dask.config.get('jobqueue.memory'),
                 interface=dask.config.get('jobqueue.interface'),
                 death_timeout=dask.config.get('jobqueue.death-timeout'),
                 local_directory=dask.config.get('jobqueue.local-directory'),
                 extra=dask.config.get('jobqueue.extra'),
                 env_extra=dask.config.get('jobqueue.env-extra'),
                 **kwargs
                 ):
        """ """

If we now have separate config values for each resource manager then our current use of inheritance becomes less useful. Probably we'll get default values at runtime rather than import time, which is probably fine.

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

So we would have something like the following:

class JobQueueCluster(Cluster):
    def __init__(self,
                 name=None,
                 threads=None
                 processes=None,
...
                 **kwargs
                 ):

        if name is None:
            name = dask.config.get('jobqueue.%s.name' % self._config_name)
        if ...

from dask-jobqueue.

guillaumeeb avatar guillaumeeb commented on May 28, 2024

Yep, I agree that we should not split the config into multiple files in the end.

What @mrocklin was saying earlier was also what I was affraid of, I don't really like the idea of repeating all the keywords into each subclass __init__. The last proposed solution seems much better though, even if it add some complexity, it does take advantage of inheritance.

Rather than _config_name, we could use _scheduler_name, which might be usefull in the future for other purpose (or not ...).

We should also clearly define what goes into the pbs/slurm/sge categories, all of the values? Or should we keep some in the jobqueue level?

I personnaly have no use of this functionnality, and I believe (but I may be wrong) that this is true for most users. But the current proposed solution is not too intrusive into the scheduler subclass code, and replacing

jobqueue:
  name: dask-worker
  threads: 2
  processes: 4
  memory: 8GB
  interface: null
  death-timeout: 60
  local-directory: null
  extra: ""
  env-extra: []

  queue: null
  project: null
  walltime: '00:30:00'

  pbs:
    resource-spec: null
    job-extra: []

By

jobqueue:
  # dask options
  name: dask-worker
  death-timeout: 60

  pbs:
    threads: 2
    processes: 4
    memory: 8GB
    interface: null
    local-directory: null
    extra: ""
    env-extra: []
    queue: null
    project: null
    walltime: '00:30:00'
    resource-spec: null
    job-extra: []

in my config file is fine for me.

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

I personnaly have no use of this functionnality, and I believe (but I may be wrong) that this is true for most users. But the current proposed solution is not too intrusive into the scheduler subclass code, and replacing

Right, so we could also just decide not to make this change. @jhamman is this a concrete need, or is this more hypothetical? If the latter then do you have objections to waiting until a user raises this as an issue?

from dask-jobqueue.

jhamman avatar jhamman commented on May 28, 2024

is this a concrete need

Yes, Cheyenne uses two schedulers (slurm for the dav cluster, pbs for cheyenne proper).

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

from dask-jobqueue.

jhamman avatar jhamman commented on May 28, 2024

Not that I am aware of. Typically, that would be handled by using separate queues for the different clusters.

from dask-jobqueue.

mrocklin avatar mrocklin commented on May 28, 2024

OK, I've given this a shot in #70

from dask-jobqueue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.