Skip to content

Fix covariate adjustment looking up preenrollment table by metric name instead of data source#3275

Merged
scholtzan merged 1 commit into
mainfrom
fix-covariate-metrics
Jun 22, 2026
Merged

Fix covariate adjustment looking up preenrollment table by metric name instead of data source#3275
scholtzan merged 1 commit into
mainfrom
fix-covariate-metrics

Conversation

@scholtzan

Copy link
Copy Markdown
Collaborator

In discrete-metrics mode, metric tables are partitioned by data source ({slug}_{basis}_{data_source_name}_{period}_{idx}), with each metric as a column. But covariate adjustment looked up the preenrollment table by metric name, so the table never existed and adjustment silently fell back to unadjusted inferences every time.

Fixed both the query builder (_create_subset_metric_table_query_covariate) and the Dask prerequisite computation (_subset_metric_table_prerequisites) to resolve the table by data source name. Since a covariate can be a different metric than the during-experiment metric, the new _covariate_table_metric_name helper looks up the covariate metric's own data source.

@scholtzan scholtzan requested a review from mikewilli June 22, 2026 17:28
@scholtzan scholtzan merged commit 46c7f36 into main Jun 22, 2026
4 checks passed
@scholtzan scholtzan deleted the fix-covariate-metrics branch June 22, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant