Skip to content

Conversation

@booxter
Copy link
Contributor

@booxter booxter commented Jun 5, 2024

Next steps will be: adding more type annotations to existing functions; enabling stricter validations (--strict), revisiting existing type annotations and maybe tightening where possible (str -> Path, fewer Unions etc.)

@mergify mergify bot added testing Relates to testing ci-failure PR has at least one CI failure labels Jun 5, 2024
@booxter booxter force-pushed the more-mypy-fixes branch from 7b18500 to 446b717 Compare June 5, 2024 22:05
@mergify mergify bot removed the ci-failure PR has at least one CI failure label Jun 5, 2024
@booxter booxter force-pushed the more-mypy-fixes branch 3 times, most recently from 80de93e to 5e173ea Compare June 5, 2024 22:12
@booxter
Copy link
Contributor Author

booxter commented Jun 6, 2024

The remaining violations in the file are tackled in #1287 Both PRs combined should allow us to enable mypy for this module.

@github-actions
Copy link

e2e workflow launched on this PR: View run

@github-actions
Copy link

e2e workflow succeeded on this PR: View run, congrats!

leseb
leseb previously approved these changes Jun 10, 2024
@mergify mergify bot added the one-approval PR has one approval from a maintainer label Jun 10, 2024
@mergify
Copy link
Contributor

mergify bot commented Jun 11, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. @booxter please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase This Pull Request needs to be rebased label Jun 11, 2024
@booxter booxter changed the title mypy: src/instructlab/llamacpp/llamacpp_convert_to_gguf.py mypy: llamacpp_convert_to_gguf Jun 12, 2024
@mergify mergify bot added ci-failure PR has at least one CI failure and removed one-approval PR has one approval from a maintainer labels Jun 12, 2024
@mergify mergify bot removed needs-rebase This Pull Request needs to be rebased ci-failure PR has at least one CI failure labels Jun 12, 2024
@booxter booxter force-pushed the more-mypy-fixes branch 2 times, most recently from c187a75 to a189eb0 Compare June 12, 2024 02:49
@booxter booxter changed the title mypy: llamacpp_convert_to_gguf mypy: more modules enabled Jun 12, 2024
@booxter
Copy link
Contributor Author

booxter commented Jun 12, 2024

I'm collecting all relevant fixes for mypy here now. Seems counterproductive to split these in tiny PRs.

@booxter booxter force-pushed the more-mypy-fixes branch from 595d8f6 to c155789 Compare July 4, 2024 15:14
@mergify mergify bot added ci-failure PR has at least one CI failure and removed needs-rebase This Pull Request needs to be rebased one-approval PR has one approval from a maintainer labels Jul 4, 2024
Copy link
Contributor

@tiran tiran left a comment

Choose a reason for hiding this comment

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

The changes are fine.

I still think it is too noisy to land these changes as a 38 separate commits. It's way too noisy in the git history. IMO we don't need fine-grained history for code refactoring. After all these changes should not change behavior.

@booxter booxter force-pushed the more-mypy-fixes branch from c155789 to 4ab3ef0 Compare July 4, 2024 16:15
@mergify mergify bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Jul 4, 2024
@booxter booxter force-pushed the more-mypy-fixes branch from 4ab3ef0 to ea70faa Compare July 4, 2024 16:19
@mergify mergify bot removed the ci-failure PR has at least one CI failure label Jul 4, 2024
Copy link
Contributor

@leseb leseb left a comment

Choose a reason for hiding this comment

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

@booxter has been very patient with this large change, and the constant rebasing must have been painful. The PR has no conflicts, so I think we should free him now 🙂 It’s been a while already. Honestly, when I look at all the questionable commits that get merged these days, I cringe every time I check the commit history. @booxter did a great job with well-formatted commit messages. I don’t think we should be blocking him on the number of commits. Thanks!

@leseb leseb requested a review from tiran July 4, 2024 18:52
@mergify mergify bot added the one-approval PR has one approval from a maintainer label Jul 4, 2024
@tiran
Copy link
Contributor

tiran commented Jul 4, 2024

I like to add another data point. I haven't mentioned this before, but I did not want to insinuate foul play.

As an open source project, we welcome contributions from everybody. In return, we recognize and celebrate the work from our contributors. For some contributors, metrics such as contribution and activity statistics are important. I fear that merging 38 separate commits will skew the statistics and set bad precedence. To put the number in relation: Russel is currently the top contributor with 89 commits in total (main branch, excluding merge commits). Places 9 has 38 commits and place 10 has 33 commits.

To be clear, I don't think that the 38 commits in this PR were created out of malicious intent. You are doing a great job. I really want to have your fixes in, so we can improve our typing and code quality even further.

I hope my explanation shows that there are not only technical issues (bisect, bloated history, hard to revert), but also a human issue.

With this new information, would you be willing to compromise and squash your PR into a smaller number of commits? I'm no longer insisting on one commit, but would prefer something along the line of half a dozen to a dozen commits.

Given your technical skills and experience with typing, I would also like to nominate you to become a triager and eventually a maintainer -- if you are interested. I'll have to talk to some people and figure out how to initiate the process.

@tiran tiran added the hold In-progress PR. Tag should be removed before merge. label Jul 4, 2024
Ihar Hrachyshka added 6 commits July 5, 2024 01:43
Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
It is directly import from utils module, so we should not rely on it
being pulled by our other dependencies.

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
This subclass type is more special.

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
Warnings fixed:

Item "None" of "LlamaProxy | None" has no attribute "_current_model"
[union-attr]

Item "None" of "Llama | Any | None" has no attribute "chat_handler"
[union-attr]

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
@booxter
Copy link
Contributor Author

booxter commented Jul 5, 2024

@tiran don't get me wrong, I am not frustrated about any particular rule or policy (though of course I have my opinions), I just want to see some clarity as to what is actually considered "the right way" in this project. Signals so far are diametrically different. :) This is a bit frustrating indeed. (Honestly, I didn't think this PR will get so contentious.)

I understand people watch stats. Ideally, people don't use these numbers to celebrate or judge others' impact. (Which is e.g. minuscule here.) But if this keeps people happy, so be it. I merged most of mypy patches into one; left unrelated changes outside; only one mypy specific patch is left separated because it's not run-of-the-mill one.

Let me know if this is enough.

@booxter booxter force-pushed the more-mypy-fixes branch from ea70faa to 68546f9 Compare July 5, 2024 01:54
@mergify mergify bot removed the one-approval PR has one approval from a maintainer label Jul 5, 2024
@tiran tiran removed the hold In-progress PR. Tag should be removed before merge. label Jul 5, 2024
@mergify mergify bot merged commit b9828ae into instructlab:main Jul 5, 2024
@ktam3 ktam3 added this to the 0.18.0 milestone Jul 15, 2024
@mergify mergify bot added the dependencies Relates to dependencies label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Affects CI/CD configuration dependencies Relates to dependencies testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants