-
Notifications
You must be signed in to change notification settings - Fork 9
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
Initial lint run #54
Initial lint run #54
Conversation
I'm so sorry we lost track of this @edmondop ! How did you run this style fix? Would love to rerun and get us up to speed |
I can rebase and reimplement the fix if you feel like , shouldn't be hard |
Thanks Edmondo
Niklas
…On Thu, Nov 16 2023 at 1:34 PM, Edmondo Porcu ***@***.***> wrote:
I'm so sorry we lost track of this @edmondop <https://github.com/edmondop>
! How did you run this style fix? Would love to rerun and get us up to speed
I can rebase and reimplement the fix if you feel like , shouldn't be hard
—
Reply to this email directly, view it on GitHub
<#54 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG3CXSEGMS5LEHP45AYRJDYE2BGDAVCNFSM6AAAAAA4FHIDV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVGM2TAMRQGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
There are a lot of improvement that could be done, such as removing unused imports, getting the code length to 120, removing unused variables, etc. Can you check the current state and confirm you agree with the direction? There is still lot of work to do @nqn |
@edmondop thanks for contributing!
I think it would be beneficial for us to adopt a similar approach. Have you had any experience with ruff? Would you be open to giving it a try and updating the PR with it? |
I like the idea @wenzhe-log10 ! It looks there's quite a bit of work to be done to bring the code in line with styleguides, I just wanted to check there's buy-in to do this before I proceed further |
Almost done, there's a lot of work to do with implicits optionals that are forbidden under PEP 484 and function/types , but I am getting there. One of the biggest question I have is about models. Take for example this code: https://github.com/log10-io/log10/blob/main/log10/llm.py#L113 In this point, the code correctly guards against log10_config not being set. Few lines below it doesn't: https://github.com/log10-io/log10/blob/main/log10/llm.py#L137 In order to get mypy happy, I need to align the behavior. Is it possible for hparams to be not set, and for log10 config to be not set? @wenzhe-log10 |
@edmondop yes, both could be not set. |
then you agree that L137 for example as above should check for it to be set. What's the expected behavior when the config is not set? NOOP? raise an Exception? |
Generally speaking, it is NOOP, like Lines 175 to 176 in 38f62f8
Do you see many places need adding the guard? In |
@wenzhe-log10 after spending 2/3 hours there are still several hundreds of errors with py-right. It's probably easier to rewrite from scratch the code rather than fixing design problems and usage of problematic patterns, what do you think? |
@edmondop thanks for the effort. I'm curious to see the errors. Could you please tell me the steps to reproduce the errors? |
You can checkout the code and run |
@edmondop I didn't find |
Apologies, got a rejected push. Can you try now? |
See your latest code now. Thank you. |
No description provided.