Chaitya
04/10/2023, 7:06 PMbuild_op_context
) as described here. Now I get an error if I try to do that. Details in thread.Chaitya
04/10/2023, 7:10 PM@asset(run_config={"some": int, "inputs": str})
def my_asset():
...
After:
def my_asset(context, inputs: SomeInputs):
...
Before:
ctx = build_op_context(...)
my_asset(ctx)
After:
inputs = SomeInputs(...)
my_asset(inputs)
The last line is the problem:
my_asset(inputs)
fails with:
dagster._core.errors.DagsterInvalidInvocationError: Compute function of op 'my_asset' has context argument, but no context was provided when invoking.
if I specify the context too
inputs = SomeInputs(...)
ctx = build_op_context(...)
my_asset(ctx, inputs)
it fails with:
dagster._core.errors.DagsterInvalidInvocationError: Too many input arguments were provided for op 'my_asset'. This may be because an argument was provided for the context parameter, but no context parameter was defined for the op.
Chaitya
04/10/2023, 7:11 PMmaterialize
, but I wanted to see if I was doing something wrong with just calling the asset function directlyben
04/14/2023, 5:13 PM