-
Notifications
You must be signed in to change notification settings - Fork 11
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
Journal consistency checker #680
Conversation
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
I think you're making progress for sure. I love the use of emojis in the output. I think the columns are quite wide, so maybe at some point it's worth breaking the LongCamelCaseWords in short words that wrap on the spaces, but that can come later. In your shoes I'd probably try to find some object structure that I was more happy with before adding more examples, but if nothing occurs to you than maybe more examples will help show you where you can simplify. And I think it's fine if this is not very fast. If it takes 10-30s to process a full benchmark run, that's ok. Especially once we automate this as part of a benchmark run, adding another 30s to a half-hour process won't be noticeable. Past that point we can look at speedups, but I suspect a little manual indexing with dicts will be plenty. Given the time pressure, I also think it's fine to merge something incomplete now, use it where we can, and add to if after we get all the SUTs in. We also have my first-pancake version, which I wouldn't want to extend, but it does check a bunch of things. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a step forward to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this!
def check(self) -> bool: | ||
return not any([len(self.duplicates), len(self.missing_prompts), len(self.unknown_prompts)]) | ||
|
||
def failure_message(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: change to
def failure_message(self, *extra):
messages = list(extra)
# continue as before
then in subclasses
return super().failure_message(message)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this is just a suggestion, no need to spend time changing this now.
I don't particularly like this. I think the class hierarchy is too complicated. My general goal was to make it easy to 1) add new checks and 2) understand what each check does.
I didn't put any effort towards efficiently querying the journal, so there's room for optimization there.
I only added a handful of checks to demonstrate what this looks like. Once we decide on the approach we want to take here, I will add some more easy checks + some basic unit testing with sample run journals.
Here is what the output of a sample run looks like: