Skip to content

Extend preload documentation - #6077

Merged
jcrist merged 1 commit into
dask:masterfrom
mrocklin:preload-doc
Apr 20, 2020
Merged

jcrist merged 1 commit into
dask:masterfrom
mrocklin:preload-doc

Conversation

@mrocklin

@mrocklin mrocklin commented Apr 8, 2020

Copy link
Copy Markdown
Member

Include notes on configuration, types of inputs, and nannies

Accompanies dask/distributed#3678

  • Tests added / passed
  • Passes black dask / flake8 dask

Include notes on configuration, types of inputs, and nannies

Accompanies dask/distributed#3678
- /path/to/myfile.py # or a filename
- my_module # or a module name
preload_argv:
- [] # Pass optional keywords

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.

I assume these are per preload script (so only myfile.py has args?).

It looks like this was an existing pattern, but I find it a bit hard to read (need to mentally align the script with the args). The following might have been cleaner:

distributed:
  scheduler:
    preloads:
      - script: "import os; os.environ['A'] = 'b'"
      - script: /path/to/myfile.py
        argv: ["--option", "value"]
      - script: my_module

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I entirely agree. I probably won't make this change though. A few people asked me about preloads in one day, so I figured it would make sense to document them a bit better. I'm entirely in favor of changing how we spell these out in configuration, but I don't think that that should block this PR.

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.

Yeah, if it's an existing pattern then this is a separate issue. I wasn't sure if this config just went in or has existed for a while.

@jcrist

jcrist commented Apr 20, 2020

Copy link
Copy Markdown
Member

LGTM, merging.

@jcrist
jcrist merged commit 71113ea into dask:master Apr 20, 2020
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.

2 participants