2

我刚开始关注dagster 教程。我设法hello_cereal使用 dagit 和 Python API 运行了这项工作,但由于某种原因,在尝试使用 dagster CLI 时

dagster job execute -f hello_cereal.py

我得到一个DagsterUnmetExecutorRequirementsError

2021-10-22 15:33:22 - dagster - ERROR - hello_cereal_job - 272b37fb-9f39-44dc-b63a-dcd3dfbb7956 - 880 - RUN_FAILURE - Execution of run for "hello_cereal_job" failed. Pipeline failure during initialization for pipeline "hello_cereal_job". This may be due to a failure in initializing the executor or one of the loggers.

dagster.core.errors.DagsterUnmetExecutorRequirementsError: You have attempted to use an executor that uses multiple processes with an ephemeral DagsterInstance. A non-ephemeral instance is needed to coordinate execution between multiple processes. You can configure your default instance via $DAGSTER_HOME or ensure a valid one is passed when invoking the python APIs. You can learn more about setting up a persistent DagsterInstance from the DagsterInstance docs here: https://docs.dagster.io/deployment/dagster-instance#default-local-behavior

确实,我没有$DAGSTER_HOME设置,但由于它适用于 Web UI 和 Python API 版本,我想知道我是否在其他地方犯了错误?

我在 macOS BigSur (11.6) 上,在全新的 miniconda 安装 ( v4.10.3)、Python 3.9.5 和 dagster 上0.13.0

4

2 回答 2

1

我遇到过同样的问题。我设置了 DAGSTER_HOME 并解决了问题。来自 Dagster 文档 ( https://docs.dagster.io/deployment/dagster-instance )

如果未设置 DAGSTER_HOME,则 Dagster 工具将使用临时实例执行。在这种情况下,运行和事件日志存储将在内存中而不是持久化到磁盘,并且文件系统存储将使用一个临时目录,该目录在进程退出时被清理。这对于测试很有用,并且是直接调用 Python API(例如 JobDefinition.execute_in_process)时的默认设置。

于 2021-10-25T00:59:26.023 回答
1

感谢您的报告 - 此问题已在今天 10 月 25 日发布的 0.13.1 版本中得到修复。该命令应该可以工作,而无需担心设置 DAGSTER_HOME。

于 2021-10-25T22:29:51.890 回答