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

Update llm_engine.py #33332

Merged
merged 11 commits into from
Nov 10, 2024
Merged

Conversation

louisbrulenaudet
Copy link
Contributor

What does this PR do?

  • Added support for optional token and max_tokens parameters in the constructor.
  • Provided usage examples and detailed documentation for each method.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

- Added support for optional token and max_tokens parameters in the constructor.
- Provided usage examples and detailed documentation for each method.
@LysandreJik
Copy link
Member

cc @aymeric-roucher for review

Copy link
Contributor

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

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

Great changes, thanks a lot @louisbrulenaudet!

@aymeric-roucher
Copy link
Contributor

@louisbrulenaudet you'll just have to do a few style fixes (trailing whitespaces) before being able to merge.

@louisbrulenaudet
Copy link
Contributor Author

louisbrulenaudet commented Oct 27, 2024

Hi @aymeric-roucher, normally I've made the necessary corrections and removed the whitespaces, but I'm still getting a validation error that I can't explain.

Could you tell me what you think is wrong?

@aymeric-roucher
Copy link
Contributor

@louisbrulenaudet the error in both check_repository_consistency and check_code_quality is the following:

The following objects docstrings do not match their signature. Run `make fix-copies` to fix this. In some cases, this error may be raised incorrectly by the docstring checker. If you think this is the case, you can manually check the docstrings and then add the object name to `OBJECTS_TO_IGNORE` in `utils/check_docstrings.py`.
- HfApiEngine

I believe it might be because 3 of the 4 arguments are defined as (str, optional) in the docstrings but are only str instead of Optional[str] in their signature, so should be strin the docstrings (yes the verification is picky 😅). You can run make fix-copies to check this.

@louisbrulenaudet
Copy link
Contributor Author

Hello @aymeric-roucher,

I have the impression that all the tests have been passed, thank you again for your information and your help, I hope that everything will go well from now on and wish you a good day.

@aymeric-roucher aymeric-roucher merged commit 134ba90 into huggingface:main Nov 10, 2024
10 checks passed
@aymeric-roucher
Copy link
Contributor

It's merged! Thanks a lot for this PR @louisbrulenaudet 🤗

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
* Update llm_engine.py
- Added support for optional token and max_tokens parameters in the constructor.
- Provided usage examples and detailed documentation for each method.
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.

4 participants