问题标签 [dagster]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
947 浏览

python-3.x - 函数调用中的争论没有价值

我对 Python 很陌生,正在学习 Dagster hello 教程

我已经从教程中设置了以下内容

然而 pylint 显示

参数无值

信息。

我错过了什么?

当我尝试执行管道时,我得到以下信息

D:\python\dag>dagster pipeline execute -f hello_cereal.py -n hello_cereal_pipeline 2019-11-25 14:47:09 - dagster - DEBUG - hello_cereal_pipeline - 96c575ae-0b7d-49cb-abf4-ce998865ebb3 - PIPELINE_START - 开始执行管道“hello_cereal_pipeline”。2019-11-25 14:47:09 - dagster - 调试 - hello_cereal_pipeline - 96c575ae-0b7d-49cb-abf4-ce998865ebb3 - ENGINE_EVENT - 执行过程中的步骤 (pid: 11684) event_specific_data = {"metadata_entries": [["pid" , null, ["11684"]], ["step_keys", null, ["{'hello_cereal.compute'}"]]]} 2019-11-25 14:47:09 - dagster - 调试 - hello_cereal_pipeline - 96c575ae- 0b7d-49cb-abf4-ce998865ebb3 - STEP_START - 开始执行步骤“hello_cereal.compute”。固体=“你好谷物” solid_definition = "hello_cereal" step_key = "hello_cereal.compute" 2019-11-25 14:47:10 - dagster - 错误 - hello_cereal_pipeline - 96c575ae-0b7d-49cb-abf4-ce998865ebb3 - STEP_FAILURE - 步骤“hello_cereal.compute”的执行失败. cls_name = “FileNotFoundError”solid = “hello_cereal”solid_definition = “hello_cereal” step_key = “hello_cereal.compute”

文件“c:\users\kirst\appdata\local\programs\python\python38-32\lib\site-packages\dagster\core\errors.py”,第 114 行,在 user_code_error_boundary 产量文件“c:\users\kirst \appdata\local\programs\python\python38-32\lib\site-packages\dagster\core\engine\engine_inprocess.py",第 621 行,在 _user_event_sequence_for_step_compute_fn 中用于 gen 中的事件:文件 "c:\users\kirst\appdata \local\programs\python\python38-32\lib\site-packages\dagster\core\execution\plan\compute.py”,第 75 行,在 _execute_core_compute 中用于 _yield_compute_results(compute_context,inputs,compute_fn)中的 step_output:文件“c :\users\kirst\appdata\local\programs\python\python38-32\lib\site-packages\dagster\core\execution\plan\compute.py",第 52 行,在 user_event_sequence 中的事件的 _yield_compute_results 中:文件“c:\users\kirst\appdata\local\programs\python\python38-32\lib\site-packages\dagster\core\definitions\decorators.py”,第 418 行,计算结果 = fn(context, * *kwargs) 文件“hello_cereal.py”,第 10 行,在 hello_cereal 中,open(dataset_path, 'r') 作为 fd:

2019-11-25 14:47:10 - dagster - 调试 - hello_cereal_pipeline - 96c575ae-0b7d-49cb-abf4-ce998865ebb3 - ENGINE_EVENT - 在 183 毫秒内完成的过程中的步骤 (pid: 11684) event_specific_data = {"metadata_entries": [[" pid", null, ["11684"]], ["step_keys", null, ["{'hello_cereal.compute'}"]]]} 2019-11-25 14:47:10 - dagster - 错误 - hello_cereal_pipeline - 96c575ae-0b7d-49cb-abf4-ce998865ebb3 - PIPELINE_FAILURE - 管道“hello_cereal_pipeline”的执行失败。

[更新] 从 Rahul 的评论中,我意识到我没有复制整个示例。当我纠正我得到 FileNotFoundError

0 投票
2 回答
373 浏览

python - Integrating Dagster with Django

Hi I am trying to integrate Dagster into ongoing Django project. I am kind of struggling with providing Django context (models, apps, ...) to Dagster. As of now I am just checking wether dagit is present in sys.argv[0] in init.py of apps that are using Dagster.

Can anyone help me with setup?

0 投票
2 回答
1365 浏览

python - 固体的核心计算多次返回输出

我对 Dagster 很陌生,在文档中找不到我的问题的答案。

我有 2 个实体:一个产生从 XML 文件解析的元组(str,str),另一个只是使用元组并将对象存储在 DB 中并设置相应的字段。但是我遇到了一个错误Core compute for solid returned an output multiple times。我很确定我在设计中犯了根本性的错误。有人可以向我解释如何以正确的方式设计此管道,或者将我指向文档中解释此错误的章节吗?

0 投票
1 回答
413 浏览

python - 缓存 Dagster 的管道结果

有没有办法缓存管道中实体的输出,如果我运行相同的管道但配置略有不同(想想超参数调整),管道中的某些初始步骤不受配置更改不会执行多次?

Raw data -> CPU expensive preprocessing (A) -> model fitting (B) -> model

我希望能够运行 A 一次,但 B 的多个变体。

在 Dagster 中是否有一种优雅的方法可以做到这一点?

0 投票
2 回答
595 浏览

python - dagster 管道在使用 `execute_pipeline` 运行时成功执行,但在使用 dagit 运行时不成功

我在运行管道时遇到了LoweringErrornumba编译有关的问题,但在直接使用. 不太确定如何调试它。dagsterdagitexecute_pipeline

最小的工作示例(文件dagster_umap_pipeline.py

从 python 解释器运行就可以了:

从 dagit 开始,管道失败:

dagit -f dagster_umap_pipeline.py -n fit_umap_pipeline

fit_umap.compute失败并显示以下错误日志:

相关软件包版本:

0 投票
1 回答
337 浏览

python - 错误:“dagster.core.types.runtime”不是包

第一次在 conda 环境中安装 dagster 并尝试按照此处所述运行航空公司演示。以下是我遵循的步骤。

然后我得到以下以'dagster.core.types.runtime' is not a package消息结尾的堆栈跟踪:

0 投票
1 回答
96 浏览

python-3.x - 尝试制作自定义 BeautifulSoup Dagster 类型时出现 NoneType 错误

我一直在搞乱,@dagster_type并试图制作一个自定义HtmlSoup类型。基本上是@dagster_type一个 BeautifulSoup 对象的精美包装器。

是我一直在尝试的,但是每当我尝试调用一个使用HtmlSoup类型作为输入的实体时,例如

我收到这个错误

TypeError:“NoneType”对象不可调用

我得到一些额外的信息说

我一直在研究装饰器的内部结构以及@dagster_type装饰器的@input_hydration_config工作原理,但到目前为止我有点茫然。

感谢任何和所有的帮助!

0 投票
1 回答
252 浏览

dagster - 在 dagster 中生成文件而不关心文件名

在 dagster 教程的Materializiations 部分中,我们为中间输出选择一个文件名 ( sorted_cereals_csv_path),然后将其作为物化输出:

然而,这依赖于我们可以使用本地文件系统(这可能不是真的)这一事实,它可能会被以后的运行覆盖(这不是我想要的)并且它也迫使我们想出一个文件名永远不会被使用。

我想在我的大部分实体中做的只是说“这是一个文件对象,请为我存储它”,而不用关心的存储位置。我可以在不考虑所有这些事情的情况下实现文件吗?我应该tempfile为此使用python的工具吗?

0 投票
1 回答
463 浏览

python - 使用 Dagster 进行交叉验证

我已经开始在我们的 ML 管道中使用 Dagster,并且遇到了一些基本问题,我想知道我是否在这里遗漏了一些微不足道的东西,或者这就是它的样子......

假设我有一个简单的 ML 管道:

线性模型在 Dagster 中是直截了当的。但是如果我想添加一个小循环怎么办,比如说用于交叉验证:

在 Dagster 中是否有一种干净整洁的方法可以做到这一点?我一直在做的事情是:

使用折叠“k”作为管道的输入参数。然后运行管道 K 次。

我在这里想念什么?

0 投票
1 回答
2088 浏览

python - 您将如何参数化 Dagster 管道以运行具有多种不同配置/资产的相同实体?

假设我创建了一个具有以下实体的 Dagster 管道:

  1. 从文件执行 SQL 查询并获取结果
  2. 将结果写入表

我想同时为 10 个不同的表执行此操作。每个表都需要不同的 SQL 查询。最好的方法是什么?