You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One suggestion I have is not to raise an exception unless there is exceptional behavior. In the case of not having a project set, not all systems require users to set a project, so we should not enforce that by raising IMO. This would also apply to #6
I think we could take some time to rethink the specification of cluster specific configuration options (project included). I've not worked on two computers that use identical syntax for the batch script headers so this is something we're going to run into repeatedly.
I agree that this might provide a valuable escape hatch for unique cluster situations. I am slightly concerned that people are no longer prompted with options like wall_time=, threads_per_worker= etc, that they might use if presented with the option. I wonder if we can do a mix of explicit keywords alongside catch-all dictionary keywords.
From my point of view, it would be better to keep explicit keyword at least for basic PBS or Dask options.
And as @mrocklin said, mixing it with dictionary keywords or lists as proposed by @jhamman seems really good.
I would also suggest to explicitly tell wether this is PBS or Dask keyword, so something like that:
I feel that already proposed arguments are perfect, and the most used ones. In our cluster, we have a default for all PBS options, but the usual minimal options to set are the job name and the walltime. Since we are talking about starting a cluster here, we can add to that the resource_spec. I would almost suggest to create 3 args from the PBS resource_spec arg:
pbs_chunk_nbr=1# or pbs_select=1pbs_chunk_ncpus=36pbs_chunk_mem='109GB'
But it is maybe overkill.
I was searching if there was a need for dask_scheduler options, but as I understand from code (Did not try it yet), the scheduler is launched directly from where the PBSCluster is created, using a Localcluster. So this means either on a interactive or frontal cluster node, or directly in a notebook. I guess this is OK regarding the resource footprint of the scheduler (CPU, RAM)? What I mean is, we do not want to spawn a specific qsub job for the scheduler?
For information, see below PBS complete option list, I don't think there is anything else needed except in specific cases.
Hm, it just occured to me that every PBS options given was for the launch of only one worker... I know, I should have RTFM, at least better. But maybe it should be more transparent from the keywords name?
This does not change a lot from what I wrote above, maybe the resource_spec default value should be set (and a little lower that what is currently proposed), for example select=1:ncpus=2:mem=10GB. And we shall never have selected chunk to more than 1.
Also, maybe we should provide a n_workers keyword directly in the PBSCluster constructor, as with LocalCluster, or KubeCluster? And start right away the cluster? I don't have a strong point on that, it would just be more consistent with other Dask provided cluster.
I'm also fine with a more fine grained approach (as mentioned by @guillaumeeb). The thing we really need here is the ability to construct the header programatically. That should allow us to drop the JobQueueCluster._template attribute all together. This is not something I'm likely to get to in the short term so if anyone else wants to take a swing at it, that would be great.
So if I understand correctly, what you really want to avoid is to have fixed header options as it is now, and thus m=be more generic to cluster specific needs. So instead of using the _template, with a fine grained approach, the PBSCluster.__init__ would look something like this:
header= ['#!/bin/bash', '#PBS -N %(name)s'%name]
ifqueue!=None:
header.append('#PBS -q %(queue)s'%queue)
ifproject!=None:
header.append('#PBS -A %(project)s'%project)
...
header.extend(['#PBS %(arg)s'forarginpbs_extra])
self._script='\n'.join(header)
#build dask worker comand and add it to self._script
...
And then we should modify the JobQueueCluster.job_script() function, to only modify the worker index in the _script attribute.
@mrocklin@jhamman, if you confirm you expect something like thiw, I could work on this next week. It would probably has an effect on core class and every scheduler impl though.
@guillaumeeb - yes, your example above is more or less what I was thinking of. There are probably many ways to do this but I think you have the basic idea of what I was shooting for.
Another point, as it seems a lot of code in PBSCluster or in SLURMCluster is duplicated and generic. What is your opinion about increasing the abstract class side of JobQueueCluster (which is already the case, but make it more so)? I would like to use the JobQueueCluster.__init__ to put all the LocalCluster initialization and Dask worker command line construction in JobQueueCluster, but without using a mechanism like ABC, it would make JobqueueCluster class instantiable.
How do you feel about that?
On Sun, Mar 11, 2018 at 12:10 PM, Guillaume EB ***@***.***> wrote:
Another point, as it seems a lot of code in PBSCluster or in SLURMCluster
is duplicated and generic. What is your opinion about increasing the
abstract class side of JobQueueCluster (which is already the case, but make
it more so)? I would like to use the JobQueueCluster.__init__ to put all
the LocalCluster initialization and Dask worker command line construction
in JobQueueCluster, but without using a mechanism like ABC, it would make
JobqueueCluster class instantiable.
How do you feel about that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszFdg88-2XGL1lRSaNBBJfZna1-pMks5tdUxigaJpZM4SZupT>
.
If we plan to drop Python two that's probably a larger discussion. I
recommend that that be raised as a separate issue.
Short term I recommend supporting it so that you can make progress without
waiting on the larger decision.
Activity
mrocklin commentedon Mar 2, 2018
bocklund commentedon Mar 2, 2018
I'd be happy to help. distributed Clients running on HPC resources is a core use case for us over at ESPEI
jhamman commentedon Mar 3, 2018
I think we could take some time to rethink the specification of cluster specific configuration options (project included). I've not worked on two computers that use identical syntax for the batch script headers so this is something we're going to run into repeatedly.
jhamman commentedon Mar 5, 2018
for the sake of argument, what if we changed the current cluster signature from:
to something more flexible like:
where the job script is created programmatically:
mrocklin commentedon Mar 5, 2018
I agree that this might provide a valuable escape hatch for unique cluster situations. I am slightly concerned that people are no longer prompted with options like
wall_time=,threads_per_worker=etc, that they might use if presented with the option. I wonder if we can do a mix of explicit keywords alongside catch-all dictionary keywords.guillaumeeb commentedon Mar 5, 2018
From my point of view, it would be better to keep explicit keyword at least for basic PBS or Dask options.
And as @mrocklin said, mixing it with dictionary keywords or lists as proposed by @jhamman seems really good.
I would also suggest to explicitly tell wether this is PBS or Dask keyword, so something like that:
I feel that already proposed arguments are perfect, and the most used ones. In our cluster, we have a default for all PBS options, but the usual minimal options to set are the job name and the walltime. Since we are talking about starting a cluster here, we can add to that the resource_spec. I would almost suggest to create 3 args from the PBS resource_spec arg:
But it is maybe overkill.
I was searching if there was a need for dask_scheduler options, but as I understand from code (Did not try it yet), the scheduler is launched directly from where the PBSCluster is created, using a Localcluster. So this means either on a interactive or frontal cluster node, or directly in a notebook. I guess this is OK regarding the resource footprint of the scheduler (CPU, RAM)? What I mean is, we do not want to spawn a specific qsub job for the scheduler?
For information, see below PBS complete option list, I don't think there is anything else needed except in specific cases.
guillaumeeb commentedon Mar 5, 2018
Hm, it just occured to me that every PBS options given was for the launch of only one worker... I know, I should have RTFM, at least better. But maybe it should be more transparent from the keywords name?
This does not change a lot from what I wrote above, maybe the resource_spec default value should be set (and a little lower that what is currently proposed), for example
select=1:ncpus=2:mem=10GB. And we shall never have selected chunk to more than 1.Also, maybe we should provide a n_workers keyword directly in the PBSCluster constructor, as with LocalCluster, or KubeCluster? And start right away the cluster? I don't have a strong point on that, it would just be more consistent with other Dask provided cluster.
jhamman commentedon Mar 6, 2018
I'm also fine with a more fine grained approach (as mentioned by @guillaumeeb). The thing we really need here is the ability to construct the header programatically. That should allow us to drop the
JobQueueCluster._templateattribute all together. This is not something I'm likely to get to in the short term so if anyone else wants to take a swing at it, that would be great.guillaumeeb commentedon Mar 6, 2018
So if I understand correctly, what you really want to avoid is to have fixed header options as it is now, and thus m=be more generic to cluster specific needs. So instead of using the
_template, with a fine grained approach, thePBSCluster.__init__would look something like this:And then we should modify the JobQueueCluster.job_script() function, to only modify the worker index in the _script attribute.
guillaumeeb commentedon Mar 10, 2018
@mrocklin @jhamman, if you confirm you expect something like thiw, I could work on this next week. It would probably has an effect on core class and every scheduler impl though.
jhamman commentedon Mar 10, 2018
@guillaumeeb - yes, your example above is more or less what I was thinking of. There are probably many ways to do this but I think you have the basic idea of what I was shooting for.
mrocklin commentedon Mar 10, 2018
I would like to avoid prefixes like
pbs_*. These seem unnecessary given PBS in the name of the class.guillaumeeb commentedon Mar 10, 2018
That's fine with me, I will work on a pull request on this basis. Thanks for the comments.
guillaumeeb commentedon Mar 11, 2018
Another point, as it seems a lot of code in PBSCluster or in SLURMCluster is duplicated and generic. What is your opinion about increasing the abstract class side of JobQueueCluster (which is already the case, but make it more so)? I would like to use the
JobQueueCluster.__init__to put all the LocalCluster initialization and Dask worker command line construction in JobQueueCluster, but without using a mechanism like ABC, it would make JobqueueCluster class instantiable.How do you feel about that?
mrocklin commentedon Mar 11, 2018
guillaumeeb commentedon Mar 11, 2018
Do we want python 2 compatibility?
(Sorry for all my questioning).
mrocklin commentedon Mar 11, 2018
guillaumeeb commentedon Apr 16, 2018
I believe this issue can be closed too?