-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First full pass working * Add InfoLM module metric and fix some minor issue * Add module metric InfoLM * Apply partially some suggestions from code review * Fix an intendation in a docstring * Uncoment test parameters * Fix a minor bug, specify docstring + fix max_len for the test * Add some missing part * Add IDF support * Add 'backsorting' of scores * Update reference test results after finding the bug * Fix functional metric tests and some minor things * Update class test * Skip checking whether a metric is scriptable as transformers are usually not scriptable * Update test results * Use different link for Fisher-rao distance * Drop use_cache kwarg * Use dim_zero_cat instead of torch.cat in class metric * Set num_threads=1 when dist_sync_on_step=True Daemonic processes are not allowed to have children. As a consequence, when num_threads>1 and dist_sync_on_step=True is used, the application fails. We, therefore, enforce to automatically setting num_threads=1. * Drop enforcing num_threads=1 and add linkk to repo for generating test results * Replace _TRANSFORMERS_AUTO_AVAILABLE with _TRANSFORMERS_AUTO_AVAILABLE everywhere * Fix device placement and Set num_threads=0 as default (SkafteNicki's review) * Make testing conditional on dependency and connection * Skip tests if transformers are not available * Mark tests as skip if there's again any connection issue to HF Hub Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
- Loading branch information
1 parent
c7b7c46
commit 4ebb4a2
Showing
13 changed files
with
1,387 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. customcarditem:: | ||
:header: InfoLM | ||
:image: https://pl-flash-data.s3.amazonaws.com/assets/thumbnails/summarization.svg | ||
:tags: Text | ||
|
||
.. include:: ../links.rst | ||
|
||
###### | ||
InfoLM | ||
###### | ||
|
||
Module Interface | ||
________________ | ||
|
||
.. autoclass:: torchmetrics.text.infolm.InfoLM | ||
:noindex: | ||
|
||
Functional Interface | ||
____________________ | ||
|
||
.. autofunction:: torchmetrics.functional.text.infolm.infolm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.