While using BasicWorkflow, I encountered a minor point of confusion regarding how inference_variables are handled in conjunction with an adapter.
If I define an adapter like this:
adapter = (
bf.Adapter()
.rename("w", "inference_variables")
.concatenate(["X", "y"], into="summary_variables")
.rename("N", "inference_conditions")
)
I would expect that passing the adapter to the workflow should be sufficient:
workflow = bf.BasicWorkflow(
...
adapter=adapter
)
However, it seems that inference_variables=["w"] must still be passed separately:
workflow = bf.BasicWorkflow(
...
adapter=adapter,
inference_variables=["w"]
)
From my inspection, it looks like inference_variables is only used internally by _prepare_for_diagnostics, so this extra specification feels redundant and somewhat unintuitive, especially when the adapter already defines this mapping.
Suggestion:
It would be great if the workflow could infer inference_variables directly from the adapter/approximator when possible, or at least document this design choice more explicitly to avoid confusion.