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

Upgrade Inference Docs #274

Closed
ArsalaBangash opened this issue Oct 26, 2023 · 9 comments
Closed

Upgrade Inference Docs #274

ArsalaBangash opened this issue Oct 26, 2023 · 9 comments

Comments

@ArsalaBangash
Copy link
Contributor

Context

I've been building tutorials and creating demos for the inference library, and I find myself going back and forth between the JS Library Inference Docs and the Detailed Params documentation

Suggestions

  • Split the giant code block into sections for each task.
  • Remove the Supported Tasks section and add links to demos in each task's section
  • Add links to the Detailed Params docs for each task so devs can easily dig in the params beyond the ones showcased in the code examples
  • Add Detailed Params documentation for missing tasks like Audio To Audio, Text To Image, and others.
@ArsalaBangash
Copy link
Contributor Author

I'm open to feedback and suggestions!

I created a draft PR to help you visualize what I'm going for.

@coyotte508
Copy link
Member

I think it's a good idea, WDYT @radames @vvmnnnkv ?

@radames
Copy link
Contributor

radames commented Oct 26, 2023

thanks @ArsalaBangash , this a great idea! thanks for helping improving the docs. I'm happy to review the changes.

@vvmnnnkv
Copy link
Contributor

Good stuff, @ArsalaBangash!

Few comments:

Split the giant code block into sections for each task.
Remove the Supported Tasks section

I think we should keep task types (CV, NLP, etc.) that previously where comments in the big code block, just make them to be headers not comments. It looks more structured and easier to navigate with them :-)

Add links to the Detailed Params docs
Add Detailed Params documentation

It might be confusing that javascript examples provided there are nodejs and plain fetch(), would be nice to have huggingface.js examples as well :-) But as I understand these docs are compiled from private repo https://github.com/huggingface/api-inference not sure if HF allows contributions to that repo. Maybe docs/ could be split into a public repo @coyotte508?

@coyotte508
Copy link
Member

It might be confusing that javascript examples provided there are nodejs and plain fetch(), would be nice to have huggingface.js examples as well :-) But as I understand these docs are compiled from private repo huggingface/api-inference not sure if HF allows contributions to that repo. Maybe docs/ could be split into a public repo @coyotte508?

Oh yes we should definitely use hf.js there. I'm not sure it's possible to use in a separate repo, since docs are generated from a tests file (doc snippets are actually run as tests as well).

I will check in with the team regarding updating the JS examples to HF.js

@ArsalaBangash
Copy link
Contributor Author

@vvmnnnkv I agree with your suggestion of grouping by task type.

@coyotte508 My 2 cents on converting the api-inference js examples to hf.js: If we have customers who prefer calling the inference API without hf.js, then having those examples is still worth it.

@coyotte508
Copy link
Member

yes the consensus regarding api-inference is to improve the examples (remove node-fetch) and just mention hf.js but not change the examples otherwise

@ArsalaBangash
Copy link
Contributor Author

I committed changes to #275. Live Preview

Before I mark the PR as ready for review, I'd like to clarify:

  • Where should TextToImage go? On hf.co/tasks, textToImage is under Multimodal, whereas in this repo, it's under packages/inference/src/tasks/cv
  • Why is Table Question Answering categorized as NLP instead of Tabular/Multimodal?

coyotte508 pushed a commit that referenced this issue Nov 3, 2023
@ArsalaBangash
Copy link
Contributor Author

Docs are live so I'm closing this issue.

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

No branches or pull requests

4 participants