Skip to content

Cluster classes accept any named parameters without error #386

Closed

Description

@lesteve
from dask_jobqueue import SLURMCluster
cluster = SLURMCluster(cores=1, memory='4GB', this_parameter='does_not_make_sense')

I would expect an error somewhere saying that this_parameter is not a valid parameter. Instead it is silently ignored.

I think the cluster classes accept a **kwargs that is generally not used. This is probably done like this so that the parameters of JobQueueCluster can be used in the derived class. My feeling is that the **kwargs can be removed either from JobQueueCluster or the derived cluster classes. Even if I am wrong, my hope is that there must be a way to have a good error message.

Activity

  1. added this to the 0.7.1 milestone on Mar 5, 2020
  2. added
    bug
    on Mar 5, 2020
  3. lesteve commented on Mar 5, 2020

    @lesteve
    MemberAuthor

    Quickly jotting down some notes before I forget. The best thing I can see for now:

    • have derived Job classes have explicit parameter names (i.e. no kwargs). That means copying all the parameters from Job (base class) in each cluster-specific class
    • in JobQueueCluster add a mechanism to have an error at the cluster level that the user understands. Mechanism: either with inspect.signature or try: except TypeError: to detect that some params in the cluster **kwargs do not exist in the job_cls.
  4. modified the milestones: 0.7.1, 0.7.2 on Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions