Fabian Rabe
06/21/2021, 1:05 PM$ dagster pipeline execute -f root_io_memoized.py
[... long stacktrace ...]
dagster.check.ParameterCheckError: Param "context.version" is not a str. Got None which is type <class 'NoneType'>.
Just from a conceptual point, I probably need to provide the version of the csv file somewhere? I'm still a bit unsure, "where" the IOManager throws the error: During the output of table1_loader
or during the input of my_solid
?
The full code:
# root_io_memoized.py
import pandas as pd
from dagster import (
InputDefinition,
ModeDefinition,
pipeline,
root_input_manager,
solid,
)
from dagster.core.storage.memoizable_io_manager import (
versioned_filesystem_io_manager,
)
from dagster.core.storage.tags import MEMOIZED_RUN_TAG
import warnings
import dagster
warnings.filterwarnings("ignore", category=dagster.ExperimentalWarning)
@solid(
input_defs=[
InputDefinition("dataframe", root_manager_key="my_root_manager")
],
version="solid_version",
)
def my_solid(dataframe):
"""Do some stuff"""
print(dataframe.head())
@root_input_manager(version="root_io_version")
def table1_loader(_):
return pd.read_csv("data.csv")
@pipeline(
mode_defs=[
ModeDefinition(
resource_defs={
"my_root_manager": table1_loader,
"io_manager": versioned_filesystem_io_manager.configured(
{"base_dir": str("data/dagster_fs_io_managed")}
),
}
)
],
tags={MEMOIZED_RUN_TAG: "true"},
)
def my_pipeline():
my_solid()
alex
06/21/2021, 7:10 PMchris
06/22/2021, 12:48 AMFabian Rabe
06/22/2021, 6:54 AM