【问题标题】:How do I tell Dagit (the Dagster GUI) to run on an existing Dask cluster?我如何告诉 Dagit(Dagster GUI)在现有的 Dask 集群上运行?
【发布时间】:2021-07-03 12:26:07
【问题描述】:

我正在使用 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 的文件的目录,该文件是一个空文件。这应该没问题,因为根据这些文档,默认值是合理的:https://docs.dagster.io/deployment/dagster-instance

我有一个在“scheduler:8786”上运行的现有 Dask 集群。基于这些文档:https://docs.dagster.io/deployment/custom-infra/dask,我创建了一个名为 config.yaml 的运行配置,如下所示:

execution:
  dask:
    config:
      cluster:
        existing:
          address: "scheduler:8786"

我已经成功地将这个运行配置与 Dagster 一起使用,如下所示:

$ dagster pipeline execute -f pipeline.py -c config.yaml

(我检查了 Dask 日志并确保它确实在我的 Dask 集群上运行)

我的问题是:我怎样才能让 Dagit 使用这个 Dask 集群? 我发现唯一似乎相关的是: https://docs.dagster.io/_apidocs/execution#executors

...但它甚至没有提到 Dask 作为一个选项(它有 dagster.in_process_executor 和 dagster.multiprocess_executor,它们似乎与 dask 一点关系都没有)。

可能我需要配置 dagster-dask,记录在这里:https://docs.dagster.io/_apidocs/libraries/dagster-dask#dask-dagster-dask

...但是在使用 Dagit 时,我应该将运行配置放在哪里?例如,无法将 config.yaml 提供给 Dagit。

【问题讨论】:

    标签: pipeline dagster


    【解决方案1】:

    一些选项:

    鉴于上下文,我会推荐configured API

    【讨论】:

      猜你喜欢
      • 2022-05-19
      • 1970-01-01
      • 1970-01-01
      • 2020-06-25
      • 2018-03-09
      • 1970-01-01
      • 2020-03-10
      • 1970-01-01
      • 2018-03-16
      相关资源
      最近更新 更多