Open marov opened 2 years ago
Hi @marov, just to be sure, you want a way to include all the assert ...
statements in the slice right?
Thanks!
The ones connected to the artifact we slice
Thanks Mike for the input! For next steps, we should consider putting this on the roadmap for Jan. Needs to solicit feedback from a few other DEs to help with prioritization.
The ones connected to the artifact we slice
What if there is an assertion on an upstream dependency? E.g.,
import lineapy
a = foo()
assert a > 10
b = bar(a)
lineapy.save(b, 'b val')
I assume you want assert a > 10
to also be included right?
Yes if it fails - we shouldn't continue.
What: We need to include support
assert
statements in slices. This is a "cheap" way to add sanity checks to the "productionalized" pipelinesWhy: Just seen this cell in one of my PR reviews:
The output is "True" on the test sample, but this does not help, as a) it will be omitted in the extracted DAG and b) without
assert
it does not stop execution or raise alerts on the upcoming data ...Possible Approaches: Ideal scenario: Linea catches cells or print statements that produce boolean output and converts them to try/catch blocks (better code practice than asserts) Middle scenario: Linea adds "assert" in such cases MVP: Users write assert themself, but linea includes them in output