-
Notifications
You must be signed in to change notification settings - Fork 531
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
Adding pyright to pre-commit #477
Conversation
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.
Seriously, thank you for doing this. I only reviewed the llmfoundry
folder files (stopped at pyproject.toml
in this first pass). A few general notes:
- I saw
MutableMapping
orMapping
used forbatch
. Is it possible to be consisent.. and is there a more narrow type, e.g.Dict
that could be used? - noted a few
assert
that maybe shoudl be informative user errors
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.
bunch of ignorable comments
besides random nits, lgtm
Co-authored-by: Vitaliy Chiley <[email protected]>
This PR adds pyright to precommit and gets it to pass so that we stop making things worse. Things that should still be done in the future include (1) getting rid of as many type ignores as possible and (2) adding return types to stuff (3) fix a todo with the model gauntlet callback which currently does not actually work as a callback.
I've also removed python 3.8 from the list of python versions. The
ast.unparse
function used in the editing of the files for huggingface compatibility does not exist on python 3.8, and I think it is ok to require >=3.9