Skip to content

Conversation

julien-c
Copy link
Member

@julien-c julien-c commented Mar 7, 2025

There's no reason the API should be ≠ in Python and JS

Copy link
Contributor

@Wauplin Wauplin Mar 7, 2025

Choose a reason for hiding this comment

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

@julien-c to update these snippets, you have to:

cd packages/tasks-gen
pnpm i
pnpm run generate-snippets-fixtures

=> otherwise you'll have conflicts with the formatting. Typically all the , and ; added don't come from the generation code but from your autoformatter I think

@julien-c julien-c requested a review from mishig25 as a code owner March 7, 2025 10:43
@Vaibhavs10
Copy link
Member

oh that was by accident, I thought I was on a different PR 😮‍💨

/**
* For backward compatibility only.
*/
export class HfInference extends InferenceClient {}
Copy link
Member Author

Choose a reason for hiding this comment

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

backward compatibility line ^

Copy link
Member Author

Choose a reason for hiding this comment

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

do you have a preference vs. export const HfInference = InferenceClient; maybe @coyotte508?

Otherwise i'll merge

Copy link
Member

Choose a reason for hiding this comment

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

Maybe you could have slapped @deprecated on it

Copy link
Member Author

Choose a reason for hiding this comment

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

oooh we have this?

Copy link
Member

Choose a reason for hiding this comment

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

/**
 * @deprecated use YYY instead
 */
class XXX {
}

It will strike through in the editor everytime X is called

image

@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.

@julien-c
Copy link
Member Author

julien-c commented Mar 7, 2025

CI failure is unrelated/transient (and i get a different failure each time 🥳). I'll try to make it pass one more time then i'll give up.

In any case, ready for review!

@julien-c
Copy link
Member Author

julien-c commented Mar 7, 2025

yay! i got lucky

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

LGTM!

@julien-c julien-c merged commit 1ae84ba into main Mar 7, 2025
6 checks passed
@julien-c julien-c deleted the inference-client branch March 7, 2025 14:38
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.

7 participants