Skip to content

Security test + benchmark#1150

Merged
bkorycki merged 8 commits into
mainfrom
security-test
Jul 29, 2025
Merged

Security test + benchmark#1150
bkorycki merged 8 commits into
mainfrom
security-test

Conversation

@bkorycki

Copy link
Copy Markdown
Contributor

This does not yet enable users to run it from CLI. I will do that in a separate PR

@bkorycki bkorycki temporarily deployed to Scheduled Testing July 28, 2025 20:47 — with GitHub Actions Inactive
@bkorycki bkorycki temporarily deployed to Scheduled Testing July 28, 2025 20:47 — with GitHub Actions Inactive
@bkorycki bkorycki temporarily deployed to Scheduled Testing July 28, 2025 20:47 — with GitHub Actions Inactive
@bkorycki bkorycki marked this pull request as ready for review July 28, 2025 20:47
@bkorycki bkorycki requested a review from a team as a code owner July 28, 2025 20:48
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Comment thread src/modelbench/hazards.py
def key(self):
return f"security_hazard-0_1-{self.hazard_key}"

def score(self, sut_scores: Mapping[str, TestRecord]) -> "HazardScore":

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is literally copy-pasted from the other Hazard

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need to be? Can it be inherited?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To that in the present situation SecurityHazard would have to inherit from SafeHazardV1, and it would override every single method except for score. Conceptually I don't think it makes sense.
Ideally, benchmarks would be more composable and scoring would be its own object that can be used for different benchmarks. Maybe that can be done in the make modelbench more composable card.

Comment thread src/modelbench/hazards.py
def key(self):
return f"security_hazard-0_1-{self.hazard_key}"

def score(self, sut_scores: Mapping[str, TestRecord]) -> "HazardScore":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need to be? Can it be inherited?

@bkorycki bkorycki merged commit 051f3d0 into main Jul 29, 2025
4 checks passed
@bkorycki bkorycki deleted the security-test branch July 29, 2025 19:49
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants