From 2641dd9fc598454b6ad400c767e7b078231fc0dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 19:14:37 +0000 Subject: [PATCH 1/2] Bump torch from 1.10.1 to 1.13.1 Bumps [torch](https://github.com/pytorch/pytorch) from 1.10.1 to 1.13.1. - [Release notes](https://github.com/pytorch/pytorch/releases) - [Changelog](https://github.com/pytorch/pytorch/blob/master/RELEASE.md) - [Commits](https://github.com/pytorch/pytorch/compare/v1.10.1...v1.13.1) --- updated-dependencies: - dependency-name: torch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7ccd20e6..26c54a56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,6 @@ truecase requests>=2.20 pandas==1.3.5 transformers==4.25.1 -torch==1.10.1 +torch==1.13.1 pytest tensorflow-addons==0.19.0 diff --git a/setup.py b/setup.py index 18a7c76d..c26a43f5 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ 'pydot==1.4.0', 'lmdb==1.2.1', 'transformers==4.25.1', - 'torch==1.10.1', + 'torch==1.13.1', 'truecase', 'requests>=2.20', 'pandas==1.3.5', From e22c86cd6b701378269577c145d2241c30079f5b Mon Sep 17 00:00:00 2001 From: lopez Date: Mon, 28 Aug 2023 20:41:51 +0200 Subject: [PATCH 2/2] fix class value --- delft/textClassification/reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/delft/textClassification/reader.py b/delft/textClassification/reader.py index f18bcbcc..46b1621e 100644 --- a/delft/textClassification/reader.py +++ b/delft/textClassification/reader.py @@ -234,10 +234,10 @@ def load_dataseer_corpus_csv(filepath): reuse_list = np.asarray(reuse_list) # map boolean values to [0,1] def map_boolean(x): - return [1.0,0.0] if x else [0.0,1.0] + return [1.0,0.0] if x == 'no_reuse' else [0.0,1.0] reuse_list = np.array(list(map(map_boolean, reuse_list))) print(reuse_list) - return np.asarray(texts_list), reuse_list, None, None, ["not_reuse", "reuse"], None, None + return np.asarray(texts_list), reuse_list, None, None, ["no_reuse", "reuse"], None, None # otherwise we have the list of datatypes, and optionally subtypes and leaf datatypes datatypes = df.iloc[:,2]