【问题标题】:In Kedro, how to pick up intermediate dataset in a pipeline?在 Kedro 中,如何在管道中获取中间数据集?
【发布时间】:2020-08-27 14:47:39
【问题描述】:

我正在处理我的管道并在 jupyter notebook 上手动测试它。

这是我的情况。

我想从中提取example_trainexample_valid,所以我是这样写的。

context.pipeline.to_outputs("example_train", "example_valid")

并将另一个管道传递给 SequencialRunner,我得到了它们。

我还想要total_steps,所以我像这样更改了行。

context.pipeline.to_outputs("example_train", "example_valid", "total_steps")

但是,结果不包含exampe_train。 是的,我知道example_train 不是这个修改过的管道的输出,所以它没有包含。

有没有办法在这种情况下获取中间数据集?

【问题讨论】:

    标签: kedro


    【解决方案1】:

    您可以在catalog.yml 的数据目录中定义这些数据集,并定义它们的存储位置。

    例如:

    example_train:
      type: pandas.CSVDataSet
      filepath: data/02_intermediate/example_train.csv
    

    有关如何使用 DataCatalog 的更多信息,请参阅:https://kedro.readthedocs.io/en/stable/05_data/01_data_catalog.html#using-the-data-catalog-within-kedro-configuration

    【讨论】:

    • 感谢您的回答,但不值得调试。我的目的不是保存中间数据集,而是通过 jupyter notebook 访问这些中间对象。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-22
    • 1970-01-01
    • 2022-12-21
    • 2020-06-05
    • 1970-01-01
    • 2023-02-10
    • 2020-07-07
    相关资源
    最近更新 更多