mirror of
https://github.com/wassname/Castor.git
synced 2026-10-28 12:30:15 +08:00
Fix SM Model Internal Reproducibility Bug (#34)
* Fix SM Model reproducibility bug vocab is in different order every time, causing unseen words to use different random states * Make requirements.txt usable from conda and pip The existing torch requirement does not work with conda or pip. Also upgrade pytorch version while we are at it.
This commit is contained in:
1 parent
061cc8dd09
commit
a6fc10818f
2 files changed
+2
-2
No files matched your search
@@ -2,4 +2,4 @@ gensim==1.0.1
|
||||
nltk==3.2.1
|
||||
numpy==1.11.3
|
||||
pandas==0.19.2
|
||||
torch==0.1.11+b13b701
|
||||
pytorch==0.1.12
|
||||
+1
-1
@@ -155,7 +155,7 @@ def read_in_dataset(dataset_folder, set_folder, stop_punct=False, dash_split=Fal
|
||||
for sentence in all_data:
|
||||
for term in sentence.split():
|
||||
vocab_set.add(term)
|
||||
vocab = list(vocab_set)
|
||||
vocab = sorted(list(vocab_set))
|
||||
|
||||
return [questions, sentences, labels, max(len_q_list), max(len_s_list), vocab]
|
||||
|
||||
|
||||
Reference in new issue
Block a user