我使用的是dagster 0.11.3 (本文的最新版本)
我创建了一个Dagster管道(保存为pipeline.py),如下所示:
@solid
def return_a(context):
return 12.34
@pipeline(
mode_defs=[
ModeDefinition(
executor_defs=[dask_executor] # Note: dask only!
)
]
)
def the_pipeline():
return_a()我将DAGSTER_HOME环境变量设置为包含一个名为dagster.yaml的文件的目录,该文件是一个空文件。这应该是可以的,因为根据这些docs:https://docs.dagster.io/deployment/dagster-instance,缺省值是合理的。
我在“调度程序:8786”上运行了一个现有的Dask集群。基于这些docs:https://docs.dagster.io/deployment/custom-infra/dask,我创建了一个名为config.yaml的运行配置,如下所示:
execution:
dask:
config:
cluster:
existing:
address: "scheduler:8786"我已经成功地在Dagster中使用了这个run配置,如下所示:
$ dagster pipeline execute -f pipeline.py -c config.yaml(我检查了Dask日志,并确保它确实在我的Dask集群上运行)
我的问题是:如何才能让Dagit使用这个Dask集群?我发现的唯一一件与此有关的事情是:https://docs.dagster.io/_apidocs/execution#executors
...but --它甚至没有提到Dask作为一种选择(它有dagster.in_process_executor和dagster.multiprocess_executor,它们似乎与dask完全无关)。
可能我需要配置dagster-dask,这是在这里记录的:https://docs.dagster.io/_apidocs/libraries/dagster-dask#dask-dagster-dask。
...but使用Dagit时,我把运行配置放在哪里?例如,没有办法将config.yaml提供给达吉特。
发布于 2021-04-07 16:59:42
一些备选方案:
您可以手动将https://docs.dagster.io/concepts/configuration/configured#configured-api
dagit游乐场
考虑到上下文,我建议使用configured API。
https://stackoverflow.com/questions/66990345
复制相似问题