AlejandraVento2 commited on
Commit
5373617
1 Parent(s): a23ec7f

sklearn fix

Browse files
Files changed (2) hide show
  1. model.py +1 -2
  2. requirements.txt +2 -1
model.py CHANGED
@@ -14,7 +14,6 @@ from torch.utils.data import Dataset, DataLoader
14
  from transformers import BertTokenizer, BertModel, AdamW, get_linear_schedule_with_warmup
15
  import pytorch_lightning as pl
16
  from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping
17
- from sklearn.model_selection import train_test_split
18
 
19
  RANDOM_SEED = 42
20
  np.random.seed(RANDOM_SEED)
@@ -93,7 +92,7 @@ df.drop(['emotion', 'message_id', 'response_id', 'article_id', 'empathy', 'distr
93
 
94
  print(df.head())
95
 
96
- train_df, val_df = train_test_split(df, test_size=0.05)
97
  train_df.shape, val_df.shape
98
 
99
  LABEL_COLUMNS = ['anger','joy','fear','surprise','sadness', 'neutral']
 
14
  from transformers import BertTokenizer, BertModel, AdamW, get_linear_schedule_with_warmup
15
  import pytorch_lightning as pl
16
  from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping
 
17
 
18
  RANDOM_SEED = 42
19
  np.random.seed(RANDOM_SEED)
 
92
 
93
  print(df.head())
94
 
95
+ train_df, val_df = sklearn.model_selection.train_test_split(df, test_size=0.05)
96
  train_df.shape, val_df.shape
97
 
98
  LABEL_COLUMNS = ['anger','joy','fear','surprise','sadness', 'neutral']
requirements.txt CHANGED
@@ -2,4 +2,5 @@ transformers
2
  pytorch-lightning
3
  torch
4
  pandas
5
- numpy
 
 
2
  pytorch-lightning
3
  torch
4
  pandas
5
+ numpy
6
+ sklearn==1.0.2