Upgrading to flytekit 1.0 and i have a task taking...
# flytekit
d
Upgrading to flytekit 1.0 and i have a task taking a single schema which can't marshal it to a dataframe because this conditional is false
lv and lv.scalar and lv.scalar.schema
. looking at the inputs it seems that old versions of the task don't have the
format
field in the flyte literal, but now they do. also looks like this code returns empty dataframe rather than erroring. any context on these changes that might help point to the behavior we're seeing?
cc @Govind Raghu
also cc @Babis Kiosidis for visibility
k
Cc @Yee / @Niels Bantilan
@Kevin Su
y
can you copy your type signatures for the failing task and also the tasks responsible for any inputs to the failing task?
is anything cached?
also can you send the full stack trace?
d
i can, but unfortunately this is an error in JasperSchema (or proto-structureddataset that we need to deprecate) so it won't point to your code
the main diff on flytebackend is the the addition of the
format
field in the protobuf repr
y
yeah
but it’s a different proto message.
d
signature is bascically
Copy code
@task
def t1() -> pd.Dataframe
    ...
@task
def t2(s: JasperSchema) -> ???

@workflow
def w()
    t2(s=t1())
y
we didn’t add the field to schema, we changed the backend representation entirely of what a
pd.DataFrame
is. now it’s this
but similar to flyteschema, the type message itself is in the literal, which is why you’re seeing it
d
oh shoot so it's serialized as a structured dataset 😢
well that explains it
y
yeah 😞
sorry we didn’t think of this use-case.
d
ok i think we can fix this by changing t1 to output jasperschema
y
yes
should be able to at least.
jasper is the thing that writes to bq?
d
yea, it's tech debt we need unwind but want to upgrade to 1.0 first
should this not be caught at registration time btw?
y
i guess… it’s hard to know though right?
if that had been FlyteSchema instead of JasperSchema, it should work
cuz we also added code going the other way
so the default flyteschema transformer should know how to handle cached structureddatasets
d
oh, so flyteschemas can read structured datasets
got it, ok that's good to know, it's an issue on our side
y
hang on… am i forgetting things again
107 Views