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

Docs maintenance #3999

Merged
merged 3 commits into from
Mar 30, 2022
Merged

Docs maintenance #3999

merged 3 commits into from
Mar 30, 2022

Conversation

stevhliu
Copy link
Member

This PR links some functions to the API reference. These functions previously only showed up in code format because the path to the actual API was incorrect.

@stevhliu stevhliu added the documentation Improvements or additions to documentation label Mar 23, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 23, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Thanks ! Some comments:

@@ -32,7 +32,7 @@ FAISS retrieves documents based on the similarity of their vector representation
>>> ds_with_embeddings.add_faiss_index(column='embeddings')
```

4. Now you can query your dataset with the `embeddings` index. Load the DPR Question Encoder, and search for a question with [`Dataset.get_nearest_examples`]:
4. Now you can query your dataset with the `embeddings` index. Load the DPR Question Encoder, and search for a question with [`~datasets.search.IndexableMixin.get_nearest_examples`]:
Copy link
Member

Choose a reason for hiding this comment

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

I think you can point to the Dataset method here no ? Or the doc builder is not able to resolve it ?
Same for the other search and tf methods

Suggested change
4. Now you can query your dataset with the `embeddings` index. Load the DPR Question Encoder, and search for a question with [`~datasets.search.IndexableMixin.get_nearest_examples`]:
4. Now you can query your dataset with the `embeddings` index. Load the DPR Question Encoder, and search for a question with [`~datasets.Dataset.get_nearest_examples`]:

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like neither format works even though the function - get_nearest_examples - is in the list of [[autodoc]] datasets.Dataset and the path to it is correct.

Copy link
Member

Choose a reason for hiding this comment

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

I merged master into this branch to update the doc builder app. Hopefully it fixes the issue

Copy link
Member Author

Choose a reason for hiding this comment

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

Pinging @sgugger for help as well! 🙌

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure you have all dependencies installed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm using the full path to the method doesn't seem to work either though. For example, when I write [~datasets.arrow_dataset.TensorflowDatasetMixin.to_tf_dataset], it is still displayed without a link (this page for example).

Thanks so much for investigating and this is no rush! 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Disentangled the mess in this PR. Once it's merged, you should have intra-links that work better for those kinds of methods :-)

Copy link
Member

Choose a reason for hiding this comment

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

Cool thanks ! I guess it means can have [Dataset.get_nearest_examples] and merge this PR :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you can even check it works on the doc build of this PR beforehand since the PR is merged.
On my tests locally, this particular reference was properly resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Woo everything looks good now, thanks so much Sylvain! 🥇

docs/source/stream.mdx Outdated Show resolved Hide resolved
docs/source/stream.mdx Outdated Show resolved Hide resolved
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Awesome thanks !

@stevhliu stevhliu merged commit bfb3d09 into huggingface:master Mar 30, 2022
@stevhliu stevhliu deleted the docs-maintenance branch March 30, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants