-
Notifications
You must be signed in to change notification settings - Fork 2k
rename HfApiModel
to InferenceClientModel
#1198
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
Conversation
HfApiModel
to `InferenceClientModelHfApiModel
to InferenceClientModel
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.
LGTM
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.
Makes perfect sense to switch the naming as early as possible !
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
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.
unrelated note: if we renamed all doc files to .md
(which is the case in our other libraries IIRC) we would have less messy diffs inside GitHub.
cc @mishig25 for viz
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.
I think we did it to get documentation examples like https://github.com/huggingface/smolagents/blob/main/docs/source/en/examples/multiagents.mdx work in Colab (the open in Colab button)
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.
Yes, I renamed them to .mdx to have them automatically converted to notebooks: https://github.com/huggingface/notebooks
This is the case for some other libraries like: datasets, setfit, diffusers,...
Note that the weird diffs are indeed caused by the HTML header comment:
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
...
In datasets
we decided to delete this header comment.
I can remove them as well in smolagents if you agree.
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.
I have opened a PR on the doc-builder
repo to add support for creating notebooks from .md files as well:
Once merged, we could rename all relevant files from .mdx back to .md. This will enable native Markdown rendering in IDEs.
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.
nice! thanks @albertvillanova
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. |
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.
i've merged main
, so the commit history is slightly messy but the diff should be 👍
@julien-c I will close my PR and follow and build on your branch, thanks for the ping |
I accidentally didn't checkout to a new branch when I made my changes (derived from your branch) @julien-c CLI tests are passing on my end, I can revert or not however you like! sorry |
@merveenoyan it's fine 😄 |
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.
Just a general thought: as we're removing the Hf
prefix from the name, I'm wondering how users will be able to distinguish this from other inference-client-style models (which we usually refer to as ApiModel
s), such as those for LiteLLM
or OpenAI
. Do you think we might need some additional naming clarity to help differentiate them?
@albertvillanova i think it's fine (maybe better) if the name is kinda generic and does not reference HF explicitly, given one of the goals is precisely:
let me know if this makes sense! |
Thanks for the clarification, @julien-c. Let me try to explain my point a bit better. My concern is that the name For instance, My question is: shouldn't we aim for a name that more clearly distinguishes our inference-client model from other similar inference-client models (like LiteLLM), to avoid ambiguity? |
We have discussed this internally with @julien-c on Slack . But in the broader context of the Hub + smolagents, this renaming makes sense. |
(leaning towards |
@albertvillanova it's a bit philosophical and i agree the name is generic but we can't change it now as we've strongly pushed |
I think |
One failing test @julien-c : |
InferenceClient
) which we are going to push more in the coming months cc @Wauplin @hanouticelina – along with Inference ProvidersModel
suffix to adhere to smolagents' naming convention