Does anyone know why is this an invalid format in ...
# prefect-community
n
Does anyone know why is this an invalid format in the Prameter section of the UI?
Copy code
{
"strings": ['string1', 'string2'],
'start_date': '20200920',
'end_date': '20200930',
}
n
Hi @Newskooler ! Yes, you'll need to use double quotes for those strings, since single quotes aren't correct in JSON syntax
we have a ticket to make that clearer in those inputs: https://github.com/PrefectHQ/ui/issues/15
👍 1
n
Yeah I changed that and it still did not work. I just found out that the trailing comma was causing the error too.
n
Ah yes, I missed that, sorry!
n
Btw @nicholas do you know how can I pass a Dask executor via the UI run? or should it passed in some other way?
n
Definitely, you can pass that as part of your flow's environment like this:
Copy code
from prefect.engine.executors import LocalDaskExecutor

# other stuff

flow.environment = LocalEnvironment(
    labels=[], executor=LocalDaskExecutor(scheduler="threads", num_workers=6),
)
👍 1
n
Thanks! I see there are two dask executors:
LocalDaskExecutor
and
DaskExecutor
, why is that?
n
`LocalDaskExecutor`: - uses the threaded / process based dask scheduler - can only run on one machine via multithreading / multiprocessing - a little more lightweight, a little less configurable - basically depends on your machine’s resources `DaskExecutor`: - uses the distributed scheduler - can run across multiple machines with networking configuration, etc. (clearly better for huge jobs) - can leverage heterogenous workers - requires more configuration (but does work locally!) / heavier
👍 1
n
Thank you very much, again : )
😄 1