burr icon indicating copy to clipboard operation
burr copied to clipboard

Make serde errors more informative

Open elijahbenizzy opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. It's a little unclear what's happening. This fails due to internal errors:

from typing import Optional
from burr.core import action, State, serde
import pandas as pd
import numpy as np

from burr.core.application import ApplicationBuilder

@action(reads=[], writes=["output"])
def act(state: State) -> State:
    random_pandas_df = pd.DataFrame(np.random.rand(4, 5), columns=list("abcde"))
    return state.update(output=random_pandas_df)


if __name__ == "__main__":
    app = (
        ApplicationBuilder()
        .with_actions(act)
        .with_transitions()
        .with_tracker(
            project="test_pandas",
        )
        .with_entrypoint("act")
        .build()
    )
    action, result, state = app.run(halt_after=["act"])

Describe the solution you'd like

We should be able to: (1) have reasonable defaults for this (E.G. the python path) (2) make it clear if we do not have the values we need (3) type-check the values coming in (4) Document more how to handle this

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context User Bill Liu on discord (thanks!)

elijahbenizzy avatar Sep 03 '24 18:09 elijahbenizzy