Skip to content

FIX: run only the Psychosocial sub-harms whose datasets were picked - #3086

Merged
Richard Lundeen (richlundeen) merged 5 commits into
microsoft:mainfrom
u7k4rs6:fix/psychosocial-dataset-subset
Oct 12, 2026
Merged

Richard Lundeen (richlundeen) merged 5 commits into
microsoft:mainfrom
u7k4rs6:fix/psychosocial-dataset-subset

Conversation

@u7k4rs6

Copy link
Copy Markdown
Contributor

Fixes #3085.

_selected_sub_harms() now keeps only the requested sub-harms whose dataset is in the dataset config. Validation, seed resolution, the estimate and the attack build all go through it, so a dataset subset narrows all of them. If none of the requested sub-harms has its dataset, it raises a DatasetConstraintError that names the missing dataset.

The default config has both datasets, so default runs and sub_harm alone behave the same as before. Compound configs still hit the existing "compound children" error.

Same repro on this branch:

requested sources: ['airt_licensed_therapist']
run datasets: ['airt_licensed_therapist']
atomic attacks: ['licensed_therapist']

Tests: a therapist-only config builds and estimates only that sub-harm, and sub_harm=imminent_crisis with only the therapist dataset raises. Both fail on main. tests/unit/scenario and backend: 3815 passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dac88b3-ab21-4741-9ee9-beb49a3adeea
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 12, 2026
Merged via the queue into microsoft:main with commit a6efcd4 Oct 12, 2026
55 checks passed
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.

BUG: Psychosocial ignores a dataset subset and runs both sub-harms

2 participants