From 5d78c17748c95547f4692ef367f3e113f96a3b04 Mon Sep 17 00:00:00 2001 From: Daniel Stancl <46073029+stancld@users.noreply.github.com> Date: Tue, 16 May 2023 13:42:38 +0200 Subject: [PATCH 1/2] rouge_score: Fix lookup for punkt sources being downloaded (#1782) * rouge_score: Fix lookup for punkt sources being downloaded * chlog --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- CHANGELOG.md | 2 ++ src/torchmetrics/functional/text/rouge.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aac7236fb06..a8901c43b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -189,6 +189,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed use of `prefix` and `postfix` in nested `MetricCollection` ([#1773](https://github.com/Lightning-AI/torchmetrics/pull/1773)) +- Fixed lookup for punkt sources being downloaded in `RougeScore` [#1789](https://github.com/Lightning-AI/torchmetrics/pull/1789) + ## [0.11.4] - 2023-03-10 ### Fixed diff --git a/src/torchmetrics/functional/text/rouge.py b/src/torchmetrics/functional/text/rouge.py index cfeee0d5874..015d7014ff6 100644 --- a/src/torchmetrics/functional/text/rouge.py +++ b/src/torchmetrics/functional/text/rouge.py @@ -49,7 +49,7 @@ def _ensure_nltk_punkt_is_downloaded() -> None: import nltk try: - nltk.data.find("tokenizers/punkt.zip") + nltk.data.find("tokenizers/punkt") except LookupError: try: nltk.download("punkt", quiet=True, force=False, halt_on_error=False, raise_on_error=True) From 4cef0ae50ccd6aaa1195adddc812cd28002ea5a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 13:04:45 +0000 Subject: [PATCH 2/2] build(deps): update dython requirement from <=0.7.3 to <=0.7.4 in /requirements (#1787) * build(deps): update dython requirement in /requirements Updates the requirements on [dython](https://github.com/shakedzy/dython) to permit the latest version. - [Release notes](https://github.com/shakedzy/dython/releases) - [Changelog](https://github.com/shakedzy/dython/blob/master/CHANGELOG.md) - [Commits](https://github.com/shakedzy/dython/compare/0.1.0...v0.7.4) --- updated-dependencies: - dependency-name: dython dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Drop ToDo --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com> --- requirements/nominal_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/nominal_test.txt b/requirements/nominal_test.txt index df025808422..f4e41f7151f 100644 --- a/requirements/nominal_test.txt +++ b/requirements/nominal_test.txt @@ -2,5 +2,5 @@ # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment pandas >1.0.0, <=2.0.1 # cannot pin version due to numpy version incompatibility -dython <=0.7.3 # todo: pin version, but some version resolution issue +dython <=0.7.4 scipy >1.0.0, <1.11.0 # cannot pin version due to some version conflicts with `oldest` CI configuration