Skip to content

Commit

Permalink
Merge branch 'master' into new-models-and-formats
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 authored Nov 27, 2023
2 parents 46f809a + b3ba6e8 commit 67c8a63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions delft/textClassification/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ truecase
requests>=2.20
pandas==1.3.5
transformers==4.33.2
torch==1.10.1
torch==1.13.1
pytest
tensorflow-addons==0.19.0
blingfire==0.1.8
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'pydot==1.4.0',
'lmdb==1.2.1',
'transformers==4.33.2',
'torch==1.10.1',
'torch==1.13.1',
'truecase',
'requests>=2.20',
'pandas==1.3.5',
Expand Down

0 comments on commit 67c8a63

Please sign in to comment.