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: Update docs of MetaFieldRanker, TransformersSimilarityRanker #7301

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

julian-risch
Copy link
Member

Related Issues

Proposed Changes:

  • Update docstrings of MetaFieldRanker, TransformersSimilarityRanker
  • Remove to_dict/from_dict that just uses the default implementation and the corresponding tests. There is no reason to test the default implementation of component_to_dict(obj).

How did you test it?

Notes for the reviewer

LostInTheMiddleRanker was done in a separate PR: #7294

Checklist

@julian-risch julian-risch added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Mar 4, 2024
@julian-risch julian-risch requested a review from a team as a code owner March 4, 2024 17:22
@julian-risch julian-risch requested review from anakin87 and removed request for a team March 4, 2024 17:22
@github-actions github-actions bot added topic:tests 2.x Related to Haystack v2.0 type:documentation Improvements on the docs labels Mar 4, 2024
@coveralls
Copy link
Collaborator

coveralls commented Mar 4, 2024

Pull Request Test Coverage Report for Build 8153447014

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 17 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.003%) to 90.051%

Files with Coverage Reduction New Missed Lines %
components/rankers/transformers_similarity.py 8 90.91%
components/readers/extractive.py 9 95.69%
Totals Coverage Status
Change from base Build 8143319828: -0.003%
Covered Lines: 5286
Relevant Lines: 5870

💛 - Coveralls

Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

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

Approved with some minor comments. (Feel free to consider or discard them.)

I appreciated your efforts to better explain what is going on in the Components.

haystack/components/rankers/meta_field.py Outdated Show resolved Hide resolved
Comment on lines 70 to 73
-'float' will parse the meta values into floats.
-'int' will parse the meta values into integers.
-'date' will parse the meta values into datetime objects.
-'None' (default) will do no parsing.
Copy link
Member

Choose a reason for hiding this comment

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

Generally, I had no luck with rendering bulleted lists inside params. I always got a flat list.
Please check locally if the generated markdown is ok.

haystack/components/rankers/meta_field.py Outdated Show resolved Hide resolved
haystack/components/rankers/transformers_similarity.py Outdated Show resolved Hide resolved
haystack/components/rankers/meta_field.py Outdated Show resolved Hide resolved
@julian-risch julian-risch merged commit c1c0cbf into main Mar 5, 2024
20 checks passed
@julian-risch julian-risch deleted the ranker-docstrings branch March 5, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docstrings - haystack.components.rankers
3 participants