diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3c7cd15..17bb915 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -24,3 +24,4 @@ python: extra_requirements: - dev - eval + - vad diff --git a/docs/source/_templates/custom-module-template.rst b/docs/source/_templates/custom-module-template.rst index d70a849..4635585 100644 --- a/docs/source/_templates/custom-module-template.rst +++ b/docs/source/_templates/custom-module-template.rst @@ -8,7 +8,7 @@ .. rubric:: Module Attributes .. autosummary:: - :toctree: <-- add this line + :toctree: {% for item in attributes %} {{ item }} {%- endfor %} @@ -20,7 +20,7 @@ .. rubric:: {{ _('Functions') }} .. autosummary:: - :toctree: <-- add this line + :toctree: {% for item in functions %} {{ item }} {%- endfor %} @@ -32,8 +32,8 @@ .. rubric:: {{ _('Classes') }} .. autosummary:: - :toctree: <-- add this line - :template: custom-class-template.rst <-- add this line + :toctree: + :template: custom-class-template.rst {% for item in classes %} {{ item }} {%- endfor %} @@ -45,7 +45,7 @@ .. rubric:: {{ _('Exceptions') }} .. autosummary:: - :toctree: <-- add this line + :toctree: {% for item in exceptions %} {{ item }} {%- endfor %} @@ -58,7 +58,7 @@ .. autosummary:: :toctree: - :template: custom-module-template.rst <-- add this line + :template: custom-module-template.rst :recursive: {% for item in modules %} {{ item }} diff --git a/simulstream/metrics/scorers/quality/comet.py b/simulstream/metrics/scorers/quality/comet.py index e1db3f4..6db4b25 100644 --- a/simulstream/metrics/scorers/quality/comet.py +++ b/simulstream/metrics/scorers/quality/comet.py @@ -13,17 +13,13 @@ # limitations under the License import argparse -import sys from typing import List from simulstream.metrics.scorers.quality import register_quality_scorer from simulstream.metrics.scorers.quality.mwersegmenter import MWERSegmenterBasedQualityScorer, \ ResegmentedQualityScoringSample -try: - from comet import download_model, load_from_checkpoint -except ImportError: - sys.exit("Please install comet first with `pip install unbabel-comet`.") +from comet import download_model, load_from_checkpoint @register_quality_scorer("comet")