Hi guys, I have a question related to verifying O...
# ask-community
w
Hi guys, I have a question related to verifying Op execution config that I haven't been able to answer via the documentation or src. My setup is approximately:
Copy code
@asset
def bar(context):
  # materialize an asset ...

@asset(config_schema={"bar":str})
def foo(context) -> Output[str]:
  return Output(context.op_config['bar'])

exec_config = { "execution": { "config": { "start_method": {"forkserver": {} } } } }

job = define_asset_job(
  "foo_job",
  selection=[foo],
  config=ConfigMapping(config_fn=lambda run_config: {**run_config, **exec_config}),
  executor_def=multiprocess_executor
)

@asset_sensor(name="foo_sensor", job=job, asset_key="bar")
def foo_sensor(context, event):
  yield RunRequest(run_config={ "ops": { "foo": { "config": { "bar": "baz" } } } } )

defs = Definitions(sensors=[foo_sensor], assets=[foo])
My job successfully enqueues and executes
foo
but I am unsure whether
exec_config
is concatenated and read. Clicking "view tags and config" in Dagit's Run detail view only shows the op config. Can anyone confirm whether my approach is either correct or incorrect?
s
Hi Will - right now, Dagit only shows the "input" config, not the result of config mapping. It should still be there. You can verify this by printing out
context.op_config
inside your asset function.
w
Thanks, @sandy