https://dagster.io/ logo
Title
f

Fabian Rabe

06/21/2021, 1:05 PM
Hi everyone, I have a question regarding Root Input Managers and the memoization feature with the VersionedPickledObjectFilesystemIOManager : Are there known incompatibilities between these two experimental features, or am I using them wrong? To showcase my problem, I have made the example code of the root input manager memoizable (see code below) and am getting the following error:
$ 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()
a

alex

06/21/2021, 7:10 PM
@chris
c

chris

06/22/2021, 12:48 AM
Hey! Sorry for the late reply. This is a known incompatibility, but this error message is really rough. Just made an issue to track: https://github.com/dagster-io/dagster/issues/4304
f

Fabian Rabe

06/22/2021, 6:54 AM
Hey Chris, No worries, thanks for the reply and opening the issue 🙂 I know these are experimental features and that some things are still rough around the edges 🙂 Looking forward to where Dagster is going, I like it a lot so far 🙂