Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix for small issues with custom SUTs #457

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

wpietri
Copy link
Contributor

@wpietri wpietri commented Sep 18, 2024

Hopefully fixes #453

Just a few small things that only make a difference when running a custom SUT. We should probably add a smoke test for this, but let's talk about what form that should take.

Copy link

github-actions bot commented Sep 18, 2024

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

@@ -136,6 +136,7 @@ def content_sut(self, item: SutDescription, key: str):
if item.key in self._content:
return self._content[item.key][key]
else:
return f"{key} ({item})"
Copy link
Contributor

Choose a reason for hiding this comment

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

The raise below is unreachable now. Should we get rid of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, right. I specifically wanted to ask @dhosterman about this. For SUTs that we control, we'll put in friendly names. For others, I'm not sure how to handle the in-report name. This change keeps things from catching on fire, but it's not great otherwise. Any ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since Daniel's out, I've change this to warn about the issue, as well as to do something reasonable when it's a name being looked for.

Copy link
Contributor

@bkorycki bkorycki left a comment

Choose a reason for hiding this comment

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

Looks like a solid fix to me!
This may be a little out of scope, but this bug brought up a question for me: What's the intention in making ModelGaugeSut separate from SutDescription? I could understand this design choice if we had other types of SUTs besides ModelGaugeSut. But I think all SUTs will necessarily have to be a ModelGaugeSut.

@wpietri
Copy link
Contributor Author

wpietri commented Sep 19, 2024

What's the intention in making ModelGaugeSut separate from SutDescription?

Good question. The other subclass of SutDescription is FakeSut, which is used when anonymizing reports.

@wpietri wpietri merged commit 9b69013 into main Sep 19, 2024
4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
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.

AttributeError: 'SutDescription' object has no attribute '_instance'
3 participants