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

fix convert_llama_hf_to_nemo.py llama31 argument #11870

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

j40903272
Copy link

What does this PR do ?

Fix conversion script arguments. The original script using type=bool convert empty strings to False and non-empty strings to True. Might not be an ideal way of using it.

Collection: NLP

Changelog

  • Fix convert_llama_hf_to_nemo script --llama31 arguments.

Usage

$ scripts/checkpoint_converters/convert_llama_hf_to_nemo.py --llama31  # when it is llama31
$ scripts/checkpoint_converters/convert_llama_hf_to_nemo.py                  # when it is not llama31

Copy link
Contributor

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.


Your code was analyzed with PyLint. The following annotations have been identified:

************* Module convert_llama_hf_to_nemo
scripts/checkpoint_converters/convert_llama_hf_to_nemo.py:63:0: C0301: Line too long (218/119) (line-too-long)
scripts/checkpoint_converters/convert_llama_hf_to_nemo.py:46:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/checkpoint_converters/convert_llama_hf_to_nemo.py:75:0: C0116: Missing function or method docstring (missing-function-docstring)
scripts/checkpoint_converters/convert_llama_hf_to_nemo.py:129:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.80/10

Mitigation guide:

  • Add sensible and useful docstrings to functions and methods
  • For trivial methods like getter/setters, consider adding # pylint: disable=C0116 inside the function itself
  • To disable multiple functions/methods at once, put a # pylint: disable=C0116 before the first and a # pylint: enable=C0116 after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

@j40903272 j40903272 marked this pull request as draft January 16, 2025 12:32
@j40903272 j40903272 marked this pull request as ready for review January 16, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant