Skip to content

Use --nworkers in stead of deprecated --nprocs in the generated job scripts - #560

Merged
guillaumeeb merged 4 commits into
dask:mainfrom
ikabadzhov:deprecated-workers
Aug 7, 2022
Merged

guillaumeeb merged 4 commits into
dask:mainfrom
ikabadzhov:deprecated-workers

Conversation

@ikabadzhov

Copy link
Copy Markdown
Contributor

Fix #559.

@guillaumeeb guillaumeeb left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ikabadzhov.

Unfortunately, test will fail as CI is broken, but this is not a problem to merge. You didn't let any nprocs in the code?

Anyway, I'm thinking about one thing: we should probably update the minimum required version of Dask/Distributed. Did you check when nworkers was introduced?

@ikabadzhov

Copy link
Copy Markdown
Contributor Author

I did not leave any --nprocs that is right.

I think the deprecation was introduced here https://github.com/dask/distributed/blame/main/distributed/cli/dask_ssh.py#L52 (6 months ago). I am not sure how to map it to the right version.

Comment thread dask_jobqueue/tests/test_job.py Resolved
@guillaumeeb

Copy link
Copy Markdown
Member

Ok, so the new option name was introduced in 2022.02.0, see https://distributed.dask.org/en/stable/changelog.html#v2022-02-0.

So you should also update required distributed version with this one.

As we just released a dask-jobqueue version, I belive it is safe to just do that.

@guillaumeeb

Copy link
Copy Markdown
Member

Also, There is on failure related to your PR in the CI: the check of formatting using black. Could you run black on your branch to format things correctly?

@ikabadzhov
ikabadzhov force-pushed the deprecated-workers branch from 5bf74b6 to a8b730a Compare July 25, 2022 20:29
@ikabadzhov

ikabadzhov commented Jul 25, 2022 •

Copy link
Copy Markdown
Contributor Author

Ok, so the new option name was introduced in 2022.02.0, see distributed.dask.org/en/stable/changelog.html#v2022-02-0.

So you should also update required distributed version with this one.

As we just released a dask-jobqueue version, I belive it is safe to just do that.

I just updated the distributed requirement, now it is:

dask>=2.23
distributed>=2022.02.0

Is this what you mean? Shouldn't they be the same?

P.S. Thank you very much @guillaumeeb for your quick comments!

@guillaumeeb

Copy link
Copy Markdown
Member

Is this what you mean? Shouldn't they be the same?

This is what I mean, but yes I think they should be the same.

We may also need to wait for #562 to be in to merge this one, but not sure about it.

@jacobtomlinson jacobtomlinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since switching to CalVer we release dask and distributed in lock step and only guarantee that those releases work together. Generally pinning will mean that installing a more recent version of distributed will upgrade dask to the same version, but to be explicit we might want to bump the minimum dask version here to match distributed.

This is needed to support the `--nworkers` option.
@ikabadzhov
ikabadzhov force-pushed the deprecated-workers branch from f1b4ed9 to 22f6286 Compare July 26, 2022 09:04
@jacobtomlinson

Copy link
Copy Markdown
Member

We squash and merge here so please don't squash and force push prematurely, it makes review harder as it's unclear what has changed since the last review.

@guillaumeeb guillaumeeb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I checked for nprocs occurences, and all are well taken into account. The requirement version of Dask and distributed are OK too, this is good for me.

I still want to advance a bit on #562 before merging.

@jacobtomlinson any other comment.

@jacobtomlinson

Copy link
Copy Markdown
Member

LGTM

jolange and others added 2 commits August 7, 2022 22:06
* fix behaviour of `env_extra` for HTCondor

Before only environment variables were considered using HTCondor's
`Environment =` feature, whereas the parameter description generally
says "Other commands to add".

If the `Environment =` is needed, one can still use the generic
`job_extra` parameter to set it.

fixes dask#393
related to dask#323 dask#556

* adapt htcondor tests for new `env_extra` behaviour

* adapt htcondor tests for new `env_extra` behaviour

"export" is preserved now

* docs: made "Moab Deployments" heading the same level as the others

* docs: added description of HTCondorCluster + env_extra

- example in the docstring
- description in "example deployments""
- description in "advanced tops an tricks"

* docs: removed the HTCondorCluster section from examples

* formatting according to black and flake8
* Drop Python 3.7

* Fix cleanup fixture probem (see fistributed#9137)

* Override cleanup distributed fixture, and reconfigure dask-jobqueue when called

* Use power of 2 for the memory checks in tests (see dask#7484)

* Apply Black

* Apply correct version of black...

* conda install Python in HTCondor Docker image

* Fix HTCondor Dockerfile

* Fix PBS Issue

* Add a timeout for every wait_for_workers call

* Fix HTCondor tests, leave room for scheduling cycle to take place for HTCondor

* flake check

* debugging HTCondor tests on CI

* Flake

* reduce negotiator interval for faster job queuing, more debugging logs

* move condor command at the right place

* always run cleanup step, and print more things on HTCondor

* Clean temporary debug and other not necessary modifications

* Disable HTCondor CI for now

* Import loop_in_thread fixture from distributed

* Override method from distributed to make tests pass
@guillaumeeb

Copy link
Copy Markdown
Member

All green, merging!

@guillaumeeb
guillaumeeb merged commit 50a6f39 into dask:main Aug 7, 2022
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

Successfully merging this pull request may close these issues.

Replace --nprocs by --nworkers in the generated job script

4 participants