romnatall commited on
Commit
26290c2
1 Parent(s): 6401a38
app.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from PIL import Image
3
+ st.title("NLP project")
4
+
5
+ description_show_options = ['main','film_review','toxic_messages','GPT','над проектом работали']
6
+ description_show = st.sidebar.radio("Description", description_show_options)
7
+
8
+ if description_show == 'над проектом работали':
9
+
10
+ st.title(" над проектом работали")
11
+ col1, col2, col3 = st.columns(3)
12
+ with col1:
13
+
14
+ romaimage = Image.open("images/roma.jpg")
15
+ st.image(romaimage, caption="Рома | cosplayNet enjoyer | DevOps", use_column_width=True)
16
+ with col2:
17
+ leraimage = Image.open("images/Lera.png")
18
+ st.image(leraimage, caption="Лера | UNet bender | Data Scientist", use_column_width=True)
19
+ with col3:
20
+ olyaimage = Image.open("images/olya.jpg")
21
+ st.image(olyaimage, caption="Бауржан | streamlit master | Frontender", use_column_width=True)
22
+ elif description_show == 'GPT':
23
+ st.title("GPT")
24
+
25
+ elif description_show == 'main':
26
+ st.title("main")
27
+
28
+ elif description_show == 'film_review':
29
+ st.title("film_review")
30
+
31
+
32
+ # Weighted F1-score: 0.7069352925929284
33
+ # Classification Report:
34
+ # precision recall f1-score support
35
+
36
+ # Bad 0.67 0.81 0.74 960
37
+ # Neutral 0.65 0.50 0.56 922
38
+ # Good 0.82 0.82 0.82 896
39
+
40
+ # accuracy 0.71 2778
41
+ # macro avg 0.71 0.71 0.71 2778
42
+ # weighted avg 0.71 0.71 0.71 2778
43
+
44
+ elif description_show == 'toxic_messages':
45
+ st.title("toxic_messages")
46
+
47
+
48
+
images/Lera.png ADDED
images/olya.jpg ADDED
images/roma.jpg ADDED
pages/0film_reviev.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import re
3
+ import streamlit as st
4
+ import torch
5
+ st.title("film_review")
6
+
7
+ input_text = st.text_area("Enter your text")
8
+ from pages.film_review.model.model_lstm import *
9
+ from pages.film_review.model.model_logreg import *
10
+
11
+ @st.cache_resource
12
+ def get_model():
13
+ return torch.load("pages/film_review/model/model_lstm.pt",map_location=torch.device('cpu'))
14
+ model = get_model()
15
+ model.eval()
16
+ dec = {0:'отрицательный',1:'нейтральный',2:'положительный'}
17
+
18
+ if input_text:
19
+ with torch.no_grad():
20
+ ans = torch.nn.functional.softmax(model(input_text), dim=1)
21
+ idx = torch.argmax(ans, dim=1).item()
22
+ st.write(f'LSTM - отзыв: {dec[idx]}, уверенность: { round(ans[0][idx].item(),2)}')
23
+
24
+ st.write(f'Logreg - отзыв: {dec[ predict_tfidf(input_text)[0]]}')
25
+
26
+
27
+
28
+
29
+ else:
30
+ st.write("No text entered")
pages/1toxic_messages.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import re
3
+ import streamlit as st
4
+ import torch
5
+ from pages.anti_toxic.anti_toxic import *
6
+
7
+ st.title("toxic filtrer")
8
+
9
+ input_text = st.text_area("Enter your text")
10
+
11
+
12
+ dec = {0:'нормальный',1:'токсик'}
13
+
14
+ if input_text:
15
+ with torch.no_grad():
16
+ ans = predict(input_text).tolist()
17
+
18
+ if ans[1] > 0.5:
19
+ st.write(f'{dec[1]}, уверенность {round(ans[1],2)}')
20
+ else:
21
+ st.write(f'{dec[0]}, уверенность {round(ans[0],2)}')
22
+
23
+
24
+
25
+ else:
26
+ st.write("No text entered")
pages/2GPT.py ADDED
File without changes
pages/anti_toxic/__pycache__/anti_toxic.cpython-312.pyc ADDED
Binary file (1.74 kB). View file
 
pages/anti_toxic/anti_toxic.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
+ from catboost import CatBoostClassifier
4
+ import torch.nn as nn
5
+ import streamlit as st
6
+
7
+ @st.cache_resource
8
+ def load_model():
9
+ catboost_model = CatBoostClassifier(random_seed=42,eval_metric='Accuracy')
10
+ catboost_model.load_model("pages/anti_toxic/dont_be_toxic.cbm")
11
+ model_checkpoint = 'cointegrated/rubert-tiny-toxicity'
12
+ tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
13
+ model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)
14
+ model.classifier=nn.Dropout(0)
15
+ model.dropout = nn.Dropout(0)
16
+ return catboost_model, tokenizer, model
17
+
18
+ catboost_model, tokenizer, model = load_model()
19
+ def predict(text):
20
+ t=tokenizer(text, return_tensors='pt',truncation=True, padding=True)
21
+ with torch.no_grad():
22
+ t = model(**t)[0].tolist()[0]
23
+ return catboost_model.predict_proba(t)
pages/film_review/model/__pycache__/model_logreg.cpython-312.pyc ADDED
Binary file (949 Bytes). View file
 
pages/film_review/model/__pycache__/model_lstm.cpython-312.pyc ADDED
Binary file (6.91 kB). View file
 
pages/film_review/model/model_logreg.joblib ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e36ba8ccd4fd99dd6d91d6e22872fb714b7c40e152ad0ea2ab02e240637400f
3
+ size 4391461
pages/film_review/model/model_logreg.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from joblib import load
2
+ from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
3
+ import pickle
4
+
5
+
6
+ with open('pages/film_review/model/model_logreg_vectorizer.pkl', 'rb') as f:
7
+ vectorizer = pickle.load(f)
8
+
9
+
10
+ # Load the model
11
+ classifier = load('pages/film_review/model/model_logreg.joblib')
12
+
13
+ def predict_tfidf(text):
14
+ text_review_vectorized = vectorizer.transform([text])
15
+ prediction = classifier.predict(text_review_vectorized)
16
+ return prediction
pages/film_review/model/model_logreg_vectorizer.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fc763c85441e38ede135901e446e05332a807f8bc5264d15d18646746f5c19d
3
+ size 7548801
pages/film_review/model/model_lstm.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ca41a271e53df95eed8996bf8ed9ebe3be4df84726d9ce55319b7b7159de630
3
+ size 14679450
pages/film_review/model/model_lstm.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ATTENTION_SIZE=10
2
+ HIDDEN_SIZE=300
3
+ INPUT_SIZE=312
4
+ import torch
5
+ from transformers import AutoTokenizer, AutoModel
6
+ import torch.nn as nn
7
+
8
+ class RomanAttention(nn.Module):
9
+ def __init__(self, hidden_size: int = HIDDEN_SIZE) -> None:
10
+ super().__init__()
11
+ self.clf = nn.Sequential(
12
+ nn.Linear(HIDDEN_SIZE, 512),
13
+ nn.ReLU(),
14
+ nn.Linear(512, 1),
15
+ )
16
+
17
+ def forward(self, hidden, final_hidden):
18
+ final_hidden = final_hidden.squeeze(0).unsqueeze(1)
19
+
20
+ cat = torch.concat((hidden, final_hidden), dim=1)
21
+ clf = self.clf(cat)
22
+ vals = torch.argsort(clf, descending=False, dim=1)
23
+ index=vals[:,:ATTENTION_SIZE].squeeze(2)
24
+ index1=vals[:,ATTENTION_SIZE:].squeeze(2)
25
+ selected_values = cat[torch.arange(index.size(0)).unsqueeze(1), index]
26
+ select_clf = clf[torch.arange(index.size(0)).unsqueeze(1), index1]
27
+ unselected_values = cat[torch.arange(index.size(0)).unsqueeze(1), index1]*select_clf*select_clf
28
+ mean_unselected = torch.mean(unselected_values, dim=1)
29
+ return torch.cat((selected_values, mean_unselected.unsqueeze(1)), dim=1)
30
+
31
+
32
+ import pytorch_lightning as lg
33
+
34
+
35
+ m = AutoModel.from_pretrained("cointegrated/rubert-tiny2")
36
+ emb=m.embeddings
37
+ #emb.dropout=nn.Dropout(0)
38
+ for param in emb.parameters():
39
+ param.requires_grad = False
40
+
41
+ tokenizer = AutoTokenizer.from_pretrained("cointegrated/rubert-tiny2")
42
+ def tokenize(text):
43
+ t=tokenizer(text, padding=True, truncation=True,pad_to_multiple_of=300,max_length=300)['input_ids']
44
+ if len(t) <30:
45
+ t+=[0]*(30-len(t))
46
+ return t
47
+
48
+
49
+ class MyModel(lg.LightningModule):
50
+ def __init__(self):
51
+ super().__init__()
52
+
53
+ self.lstm = nn.LSTM(INPUT_SIZE, HIDDEN_SIZE, batch_first=True)
54
+ self.attn = RomanAttention(HIDDEN_SIZE)
55
+ self.clf = nn.Sequential(
56
+ nn.Linear(HIDDEN_SIZE*(ATTENTION_SIZE+1), 100),
57
+ nn.Dropout(),
58
+ nn.ReLU(),
59
+ nn.Linear(100, 3)
60
+ )
61
+
62
+ self.criterion = nn.CrossEntropyLoss()
63
+ self.optimizer = torch.optim.Adam(self.parameters(), lr=0.001)
64
+ self.early_stopping = lg.callbacks.EarlyStopping(
65
+ monitor='val_acc',
66
+ min_delta=0.01,
67
+ patience=2,
68
+ verbose=True,
69
+ mode='max'
70
+ )
71
+ self.verbose=False
72
+
73
+ def forward(self, x):
74
+ if type(x) == str:
75
+ x = torch.tensor([tokenize(x)])
76
+ embeddings = emb(x)
77
+ output, (h_n, c_n) = self.lstm(embeddings)
78
+ attention = self.attn(output, c_n)
79
+ out =attention #torch.cat((output, attention), dim=1)
80
+ out = nn.Flatten()(out)
81
+ out_clf = self.clf(out)
82
+ return out_clf
83
+
84
+
85
+ def training_step(self, batch, batch_idx):
86
+ x, y = batch
87
+ y_pred = self(x)
88
+ loss = self.criterion(y_pred, y)
89
+
90
+ accuracy = (torch.argmax(y_pred, dim=1) == y).float().mean()
91
+ self.log('train_loss', loss, on_epoch=True, prog_bar=True)
92
+ self.log('train_accuracy', accuracy , on_epoch=True, prog_bar=True)
93
+ return loss
94
+
95
+ def validation_step(self, batch, batch_idx):
96
+ x, y = batch
97
+ y_pred = self(x)
98
+ loss = self.criterion(y_pred, y)
99
+ accuracy = ( torch.argmax(y_pred, dim=1) == y).float().mean()
100
+ self.log('val_loss', loss , on_epoch=True, prog_bar=True)
101
+ self.log('val_accuracy', accuracy , on_epoch=True, prog_bar=True)
102
+ return loss
103
+
104
+ def configure_optimizers(self):
105
+ return self.optimizer
pages/film_review/notebook.ipynb ADDED
@@ -0,0 +1,708 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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\n",
16
+ "400\n",
17
+ "500\n",
18
+ "600\n",
19
+ "700\n",
20
+ "800\n",
21
+ "900\n",
22
+ "1000\n",
23
+ "1100\n",
24
+ "1200\n",
25
+ "1300\n",
26
+ "1400\n",
27
+ "1500\n",
28
+ "1600\n",
29
+ "1700\n",
30
+ "1800\n",
31
+ "1900\n",
32
+ "2000\n",
33
+ "2100\n",
34
+ "2200\n",
35
+ "2300\n",
36
+ "2400\n",
37
+ "2500\n",
38
+ "2600\n",
39
+ "2700\n",
40
+ "2800\n",
41
+ "2900\n",
42
+ "3000\n",
43
+ "3100\n",
44
+ "3200\n",
45
+ "3300\n",
46
+ "3400\n",
47
+ "3500\n",
48
+ "3600\n",
49
+ "3700\n",
50
+ "3800\n",
51
+ "3900\n",
52
+ "4000\n"
53
+ ]
54
+ },
55
+ {
56
+ "ename": "KeyboardInterrupt",
57
+ "evalue": "",
58
+ "output_type": "error",
59
+ "traceback": [
60
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
61
+ "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
62
+ "Cell \u001b[0;32mIn[83], line 47\u001b[0m\n\u001b[1;32m 44\u001b[0m \u001b[38;5;28mprint\u001b[39m(i)\n\u001b[1;32m 45\u001b[0m t\u001b[38;5;241m=\u001b[39mdf\u001b[38;5;241m.\u001b[39miloc[i][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mX\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[0;32m---> 47\u001b[0m t \u001b[38;5;241m=\u001b[39m \u001b[43mmodel\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mtokenizer\u001b[49m\u001b[43m(\u001b[49m\u001b[43mt\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mreturn_tensors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mpt\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43mtruncation\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpadding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39mtolist()[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 48\u001b[0m x\u001b[38;5;241m.\u001b[39mappend(t)\n\u001b[1;32m 49\u001b[0m y\u001b[38;5;241m.\u001b[39mappend(df\u001b[38;5;241m.\u001b[39miloc[i][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mY\u001b[39m\u001b[38;5;124m'\u001b[39m])\n",
63
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1511\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1511\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
64
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1520\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1516\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1520\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1522\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1523\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
65
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py:1564\u001b[0m, in \u001b[0;36mBertForSequenceClassification.forward\u001b[0;34m(self, input_ids, attention_mask, token_type_ids, position_ids, head_mask, inputs_embeds, labels, output_attentions, output_hidden_states, return_dict)\u001b[0m\n\u001b[1;32m 1556\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 1557\u001b[0m \u001b[38;5;124;03mlabels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):\u001b[39;00m\n\u001b[1;32m 1558\u001b[0m \u001b[38;5;124;03m Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,\u001b[39;00m\n\u001b[1;32m 1559\u001b[0m \u001b[38;5;124;03m config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If\u001b[39;00m\n\u001b[1;32m 1560\u001b[0m \u001b[38;5;124;03m `config.num_labels > 1` a classification loss is computed (Cross-Entropy).\u001b[39;00m\n\u001b[1;32m 1561\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 1562\u001b[0m return_dict \u001b[38;5;241m=\u001b[39m return_dict \u001b[38;5;28;01mif\u001b[39;00m return_dict \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconfig\u001b[38;5;241m.\u001b[39muse_return_dict\n\u001b[0;32m-> 1564\u001b[0m outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbert\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1565\u001b[0m \u001b[43m \u001b[49m\u001b[43minput_ids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1566\u001b[0m \u001b[43m \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1567\u001b[0m \u001b[43m \u001b[49m\u001b[43mtoken_type_ids\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken_type_ids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1568\u001b[0m \u001b[43m \u001b[49m\u001b[43mposition_ids\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mposition_ids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1569\u001b[0m \u001b[43m \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1570\u001b[0m \u001b[43m \u001b[49m\u001b[43minputs_embeds\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minputs_embeds\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1571\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1572\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_hidden_states\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1573\u001b[0m \u001b[43m \u001b[49m\u001b[43mreturn_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreturn_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1574\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1576\u001b[0m pooled_output \u001b[38;5;241m=\u001b[39m outputs[\u001b[38;5;241m1\u001b[39m]\n\u001b[1;32m 1578\u001b[0m pooled_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdropout(pooled_output)\n",
66
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1511\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1511\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
67
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1520\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1516\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1520\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1522\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1523\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
68
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py:1013\u001b[0m, in \u001b[0;36mBertModel.forward\u001b[0;34m(self, input_ids, attention_mask, token_type_ids, position_ids, head_mask, inputs_embeds, encoder_hidden_states, encoder_attention_mask, past_key_values, use_cache, output_attentions, output_hidden_states, return_dict)\u001b[0m\n\u001b[1;32m 1004\u001b[0m head_mask \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_head_mask(head_mask, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconfig\u001b[38;5;241m.\u001b[39mnum_hidden_layers)\n\u001b[1;32m 1006\u001b[0m embedding_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39membeddings(\n\u001b[1;32m 1007\u001b[0m input_ids\u001b[38;5;241m=\u001b[39minput_ids,\n\u001b[1;32m 1008\u001b[0m position_ids\u001b[38;5;241m=\u001b[39mposition_ids,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 1011\u001b[0m past_key_values_length\u001b[38;5;241m=\u001b[39mpast_key_values_length,\n\u001b[1;32m 1012\u001b[0m )\n\u001b[0;32m-> 1013\u001b[0m encoder_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencoder\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1014\u001b[0m \u001b[43m \u001b[49m\u001b[43membedding_output\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1015\u001b[0m \u001b[43m \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mextended_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1016\u001b[0m \u001b[43m \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1017\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1018\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_attention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mencoder_extended_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1019\u001b[0m \u001b[43m \u001b[49m\u001b[43mpast_key_values\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpast_key_values\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1020\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_cache\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_cache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1021\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1022\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_hidden_states\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1023\u001b[0m \u001b[43m \u001b[49m\u001b[43mreturn_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreturn_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1024\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1025\u001b[0m sequence_output \u001b[38;5;241m=\u001b[39m encoder_outputs[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 1026\u001b[0m pooled_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mpooler(sequence_output) \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mpooler \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n",
69
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1511\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1511\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
70
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1520\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1516\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1520\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1522\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1523\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
71
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py:607\u001b[0m, in \u001b[0;36mBertEncoder.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_values, use_cache, output_attentions, output_hidden_states, return_dict)\u001b[0m\n\u001b[1;32m 596\u001b[0m layer_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_gradient_checkpointing_func(\n\u001b[1;32m 597\u001b[0m layer_module\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__call__\u001b[39m,\n\u001b[1;32m 598\u001b[0m hidden_states,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 604\u001b[0m output_attentions,\n\u001b[1;32m 605\u001b[0m )\n\u001b[1;32m 606\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 607\u001b[0m layer_outputs \u001b[38;5;241m=\u001b[39m \u001b[43mlayer_module\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 608\u001b[0m \u001b[43m \u001b[49m\u001b[43mhidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 609\u001b[0m \u001b[43m \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 610\u001b[0m \u001b[43m \u001b[49m\u001b[43mlayer_head_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 611\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 612\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 613\u001b[0m \u001b[43m \u001b[49m\u001b[43mpast_key_value\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 614\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 615\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 617\u001b[0m hidden_states \u001b[38;5;241m=\u001b[39m layer_outputs[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 618\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m use_cache:\n",
72
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1511\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1511\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
73
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1520\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1516\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1520\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1522\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1523\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
74
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py:497\u001b[0m, in \u001b[0;36mBertLayer.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_value, output_attentions)\u001b[0m\n\u001b[1;32m 485\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mforward\u001b[39m(\n\u001b[1;32m 486\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 487\u001b[0m hidden_states: torch\u001b[38;5;241m.\u001b[39mTensor,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 494\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tuple[torch\u001b[38;5;241m.\u001b[39mTensor]:\n\u001b[1;32m 495\u001b[0m \u001b[38;5;66;03m# decoder uni-directional self-attention cached key/values tuple is at positions 1,2\u001b[39;00m\n\u001b[1;32m 496\u001b[0m self_attn_past_key_value \u001b[38;5;241m=\u001b[39m past_key_value[:\u001b[38;5;241m2\u001b[39m] \u001b[38;5;28;01mif\u001b[39;00m past_key_value \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m--> 497\u001b[0m self_attention_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattention\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 498\u001b[0m \u001b[43m \u001b[49m\u001b[43mhidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 499\u001b[0m \u001b[43m \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 500\u001b[0m \u001b[43m \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 501\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 502\u001b[0m \u001b[43m \u001b[49m\u001b[43mpast_key_value\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mself_attn_past_key_value\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 503\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 504\u001b[0m attention_output \u001b[38;5;241m=\u001b[39m self_attention_outputs[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 506\u001b[0m \u001b[38;5;66;03m# if decoder, the last output is tuple of self-attn cache\u001b[39;00m\n",
75
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1511\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1511\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
76
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1520\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1516\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1520\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1522\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1523\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
77
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py:427\u001b[0m, in \u001b[0;36mBertAttention.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_value, output_attentions)\u001b[0m\n\u001b[1;32m 417\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mforward\u001b[39m(\n\u001b[1;32m 418\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 419\u001b[0m hidden_states: torch\u001b[38;5;241m.\u001b[39mTensor,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 425\u001b[0m output_attentions: Optional[\u001b[38;5;28mbool\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[1;32m 426\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tuple[torch\u001b[38;5;241m.\u001b[39mTensor]:\n\u001b[0;32m--> 427\u001b[0m self_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mself\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 428\u001b[0m \u001b[43m \u001b[49m\u001b[43mhidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 429\u001b[0m \u001b[43m \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 430\u001b[0m \u001b[43m \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 431\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 432\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 433\u001b[0m \u001b[43m \u001b[49m\u001b[43mpast_key_value\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 434\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 435\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 436\u001b[0m attention_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput(self_outputs[\u001b[38;5;241m0\u001b[39m], hidden_states)\n\u001b[1;32m 437\u001b[0m outputs \u001b[38;5;241m=\u001b[39m (attention_output,) \u001b[38;5;241m+\u001b[39m self_outputs[\u001b[38;5;241m1\u001b[39m:] \u001b[38;5;66;03m# add attentions if we output them\u001b[39;00m\n",
78
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1511\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs) \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1511\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
79
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/modules/module.py:1520\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1515\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1516\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1517\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1518\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1519\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1520\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1522\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 1523\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
80
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py:355\u001b[0m, in \u001b[0;36mBertSelfAttention.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_value, output_attentions)\u001b[0m\n\u001b[1;32m 352\u001b[0m attention_scores \u001b[38;5;241m=\u001b[39m attention_scores \u001b[38;5;241m+\u001b[39m attention_mask\n\u001b[1;32m 354\u001b[0m \u001b[38;5;66;03m# Normalize the attention scores to probabilities.\u001b[39;00m\n\u001b[0;32m--> 355\u001b[0m attention_probs \u001b[38;5;241m=\u001b[39m \u001b[43mnn\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfunctional\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msoftmax\u001b[49m\u001b[43m(\u001b[49m\u001b[43mattention_scores\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdim\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 357\u001b[0m \u001b[38;5;66;03m# This is actually dropping out entire tokens to attend to, which might\u001b[39;00m\n\u001b[1;32m 358\u001b[0m \u001b[38;5;66;03m# seem a bit unusual, but is taken from the original Transformer paper.\u001b[39;00m\n\u001b[1;32m 359\u001b[0m attention_probs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdropout(attention_probs)\n",
81
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/torch/nn/functional.py:1858\u001b[0m, in \u001b[0;36msoftmax\u001b[0;34m(input, dim, _stacklevel, dtype)\u001b[0m\n\u001b[1;32m 1856\u001b[0m dim \u001b[38;5;241m=\u001b[39m _get_softmax_dim(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msoftmax\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28minput\u001b[39m\u001b[38;5;241m.\u001b[39mdim(), _stacklevel)\n\u001b[1;32m 1857\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m dtype \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m-> 1858\u001b[0m ret \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43minput\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msoftmax\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdim\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1859\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1860\u001b[0m ret \u001b[38;5;241m=\u001b[39m \u001b[38;5;28minput\u001b[39m\u001b[38;5;241m.\u001b[39msoftmax(dim, dtype\u001b[38;5;241m=\u001b[39mdtype)\n",
82
+ "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
83
+ ]
84
+ }
85
+ ],
86
+ "source": [
87
+ "import pandas as pd\n",
88
+ "import numpy as np\n",
89
+ "import matplotlib.pyplot as plt\n",
90
+ "import json\n",
91
+ "import catboost\n",
92
+ "from sklearn.calibration import LabelEncoder\n",
93
+ "from sklearn.model_selection import train_test_split\n",
94
+ "import torch\n",
95
+ "from transformers import AutoTokenizer, AutoModel\n",
96
+ "import torch.nn as nn\n",
97
+ "\n",
98
+ "\n",
99
+ "if not 'data' in globals():\n",
100
+ " with open('kinopoisk.jsonl', 'r') as json_file:\n",
101
+ " data = []\n",
102
+ " for line in json_file:\n",
103
+ " data.append(json.loads(line))\n",
104
+ "\n",
105
+ "from torch.utils.data import DataLoader, TensorDataset\n",
106
+ "\n",
107
+ "\n",
108
+ "\n",
109
+ "df = pd.DataFrame(data)\n",
110
+ "df['X'] = df['content']\n",
111
+ "encode={\"Good\":2,\"Bad\":0,\"Neutral\":1}\n",
112
+ "df['Y'] = df['grade3'].map(encode)\n",
113
+ "\n",
114
+ "\n",
115
+ "import torch\n",
116
+ "from transformers import AutoTokenizer, AutoModelForSequenceClassification\n",
117
+ "from catboost import CatBoostClassifier\n",
118
+ "import torch.nn as nn\n",
119
+ "\n",
120
+ "model_checkpoint = 'cointegrated/rubert-tiny-toxicity'\n",
121
+ "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\n",
122
+ "model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)\n",
123
+ "model.classifier=nn.Dropout(0)\n",
124
+ "model.dropout = nn.Dropout(0)\n",
125
+ "\n",
126
+ "x,y=[],[]\n",
127
+ "# if 'train_X' not in globals():\n",
128
+ "for i in range(len(df)):\n",
129
+ " if i%100==0:\n",
130
+ " print(i)\n",
131
+ " t=df.iloc[i]['X']\n",
132
+ "\n",
133
+ " t = model(**tokenizer(t, return_tensors='pt',truncation=True, padding=True))[0].tolist()[0]\n",
134
+ " x.append(t)\n",
135
+ " y.append(df.iloc[i]['Y'])\n",
136
+ " \n",
137
+ "x = np.array(x)\n",
138
+ "y = np.array(y)\n",
139
+ "\n",
140
+ "\n",
141
+ "\n",
142
+ "X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42)\n",
143
+ "\n",
144
+ "from sklearn.utils.class_weight import compute_class_weight\n",
145
+ "classes = np.unique(y)\n",
146
+ "weights = compute_class_weight(class_weight='balanced', classes=classes, y=y)\n",
147
+ "catboost = CatBoostClassifier( eval_metric='Accuracy',class_weights=weights)\n",
148
+ "catboost.fit(X_train , y_train, verbose=False,plot =True,eval_set=( X_test, y_test))\n",
149
+ "\n",
150
+ "catboost.save_model('filmreview.cbm')"
151
+ ]
152
+ },
153
+ {
154
+ "cell_type": "code",
155
+ "execution_count": 81,
156
+ "metadata": {},
157
+ "outputs": [
158
+ {
159
+ "ename": "CatBoostError",
160
+ "evalue": "/src/catboost/catboost/libs/model/model_import_interface.h:19: Model file doesn't exist: catboost_model.cbm",
161
+ "output_type": "error",
162
+ "traceback": [
163
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
164
+ "\u001b[0;31mCatBoostError\u001b[0m Traceback (most recent call last)",
165
+ "Cell \u001b[0;32mIn[81], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m catboost_model \u001b[38;5;241m=\u001b[39m catboost\u001b[38;5;241m.\u001b[39mCatBoostClassifier(random_seed\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m42\u001b[39m,eval_metric\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAccuracy\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m----> 2\u001b[0m \u001b[43mcatboost_model\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_model\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcatboost_model.cbm\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",
166
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/catboost/core.py:3424\u001b[0m, in \u001b[0;36mCatBoost.load_model\u001b[0;34m(self, fname, format, stream, blob)\u001b[0m\n\u001b[1;32m 3421\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m CatBoostError(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mExactly one of fname/stream/blob arguments mustn\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt be None\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 3423\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m fname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m-> 3424\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_load_model\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mformat\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3425\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m stream \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 3426\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_load_from_stream(stream)\n",
167
+ "File \u001b[0;32m~/anaconda3/envs/cv/lib/python3.12/site-packages/catboost/core.py:1899\u001b[0m, in \u001b[0;36m_CatBoostBase._load_model\u001b[0;34m(self, model_file, format)\u001b[0m\n\u001b[1;32m 1897\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m CatBoostError(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mInvalid fname type=\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m: must be str() or pathlib.Path().\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\u001b[38;5;28mtype\u001b[39m(model_file)))\n\u001b[1;32m 1898\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_init_params \u001b[38;5;241m=\u001b[39m {}\n\u001b[0;32m-> 1899\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_object\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_load_model\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mformat\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1900\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_set_trained_model_attributes()\n\u001b[1;32m 1901\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key, value \u001b[38;5;129;01min\u001b[39;00m iteritems(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_params()):\n",
168
+ "File \u001b[0;32m_catboost.pyx:5202\u001b[0m, in \u001b[0;36m_catboost._CatBoost._load_model\u001b[0;34m()\u001b[0m\n",
169
+ "File \u001b[0;32m_catboost.pyx:5205\u001b[0m, in \u001b[0;36m_catboost._CatBoost._load_model\u001b[0;34m()\u001b[0m\n",
170
+ "\u001b[0;31mCatBoostError\u001b[0m: /src/catboost/catboost/libs/model/model_import_interface.h:19: Model file doesn't exist: catboost_model.cbm"
171
+ ]
172
+ }
173
+ ],
174
+ "source": [
175
+ "catboost_model = catboost.CatBoostClassifier(random_seed=42,eval_metric='Accuracy')\n",
176
+ "catboost_model.load_model(\"catboost_kino.cbm\")\n",
177
+ "tokenizer = AutoTokenizer.from_pretrained(\"cointegrated/rubert-tiny2\")\n",
178
+ "model = AutoModel.from_pretrained(\"cointegrated/rubert-tiny2\")\n",
179
+ "def embed_bert_cls(text, model, tokenizer):\n",
180
+ " t = tokenizer(text, padding=True, truncation=True, return_tensors='pt')\n",
181
+ " with torch.no_grad():\n",
182
+ " model_output = model(**{k: v.to(model.device) for k, v in t.items()})\n",
183
+ " embeddings = model_output.last_hidden_state[:, 0, :]\n",
184
+ " embeddings = torch.nn.functional.normalize(embeddings)\n",
185
+ " return embeddings[0].cpu().numpy()\n",
186
+ "\n",
187
+ "\n",
188
+ "def predict(text):\n",
189
+ " embeddings = embed_bert_cls(text, model, tokenizer)\n",
190
+ " return catboost_model.predict_proba(embeddings.reshape(1, -1))[0]\n"
191
+ ]
192
+ },
193
+ {
194
+ "cell_type": "code",
195
+ "execution_count": 147,
196
+ "metadata": {},
197
+ "outputs": [
198
+ {
199
+ "data": {
200
+ "text/plain": [
201
+ "torch.int64"
202
+ ]
203
+ },
204
+ "execution_count": 147,
205
+ "metadata": {},
206
+ "output_type": "execute_result"
207
+ }
208
+ ],
209
+ "source": [
210
+ "dataiter = iter(train_loader)\n",
211
+ "sample_x, sample_y = next(dataiter)\n",
212
+ "sample_y.dtype "
213
+ ]
214
+ },
215
+ {
216
+ "cell_type": "code",
217
+ "execution_count": 150,
218
+ "metadata": {},
219
+ "outputs": [
220
+ {
221
+ "data": {
222
+ "text/plain": [
223
+ "tensor([2, 2, 2, 1, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2,\n",
224
+ " 2, 2, 2, 2, 2, 2, 2, 2])"
225
+ ]
226
+ },
227
+ "execution_count": 150,
228
+ "metadata": {},
229
+ "output_type": "execute_result"
230
+ }
231
+ ],
232
+ "source": [
233
+ "from ast import mod\n",
234
+ "import pandas as pd\n",
235
+ "import numpy as np\n",
236
+ "\n",
237
+ "from sklearn.model_selection import train_test_split\n",
238
+ "\n",
239
+ "\n",
240
+ "\n",
241
+ "\n",
242
+ "\n",
243
+ "df = pd.read_csv('toxic.csv')\n",
244
+ "\n",
245
+ "x,y=[],[]\n",
246
+ "\n",
247
+ "if 'train_X' not in globals():\n",
248
+ " for i in range(len(df)):\n",
249
+ " if i%100==0:\n",
250
+ " print(i)\n",
251
+ " t=df.iloc[i]['comment']\n",
252
+ "\n",
253
+ " t = model(**tokenizer(t, return_tensors='pt',truncation=True, padding=True))[0].tolist()[0]\n",
254
+ " x.append(t)\n",
255
+ " y.append(df.iloc[i]['toxic'])\n",
256
+ "x = np.array(x)\n",
257
+ "y = np.array(y)\n",
258
+ "\n",
259
+ "train_X, test_X, train_y, test_y = train_test_split(x, y, test_size=0.2, random_state=42)\n",
260
+ "from sklearn.utils.class_weight import compute_class_weight\n",
261
+ "classes = np.unique(y)\n",
262
+ "weights = compute_class_weight(class_weight='balanced', classes=classes, y=y)\n",
263
+ "\n",
264
+ "\n",
265
+ "catboost = CatBoostClassifier( eval_metric='Accuracy',class_weights=weights)\n",
266
+ "catboost.fit(train_X, train_y, verbose=False,plot =True,eval_set=(test_X, test_y))\n",
267
+ "\n",
268
+ "#save\n",
269
+ "torch.save(catboost.state_dict(), 'model.pt')\n",
270
+ "\n",
271
+ "\n",
272
+ "import torch\n",
273
+ "from transformers import AutoTokenizer, AutoModelForSequenceClassification\n",
274
+ "from catboost import CatBoostClassifier\n",
275
+ "import torch.nn as nn\n",
276
+ "catboost_model = catboost.CatBoostClassifier(random_seed=42,eval_metric='Accuracy')\n",
277
+ "catboost_model.load_model(\"catboost_model.cbm\")\n",
278
+ "model_checkpoint = 'cointegrated/rubert-tiny-toxicity'\n",
279
+ "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\n",
280
+ "model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)\n",
281
+ "model.classifier=nn.Dropout(0)\n",
282
+ "model.dropout = nn.Dropout(0)\n",
283
+ "\n",
284
+ "def predict(text):\n",
285
+ " t=tokenizer(text, return_tensors='pt',truncation=True, padding=True)\n",
286
+ " t = model(**t)[0].tolist()[0]\n",
287
+ " return t\n"
288
+ ]
289
+ },
290
+ {
291
+ "cell_type": "code",
292
+ "execution_count": 149,
293
+ "metadata": {},
294
+ "outputs": [
295
+ {
296
+ "data": {
297
+ "text/plain": [
298
+ "torch.float32"
299
+ ]
300
+ },
301
+ "execution_count": 149,
302
+ "metadata": {},
303
+ "output_type": "execute_result"
304
+ }
305
+ ],
306
+ "source": [
307
+ "model(sample_x).dtype "
308
+ ]
309
+ },
310
+ {
311
+ "cell_type": "code",
312
+ "execution_count": 43,
313
+ "metadata": {},
314
+ "outputs": [
315
+ {
316
+ "data": {
317
+ "text/plain": [
318
+ "tensor([[ 0.0038, -0.0042, -0.1281]], grad_fn=<AddmmBackward0>)"
319
+ ]
320
+ },
321
+ "execution_count": 43,
322
+ "metadata": {},
323
+ "output_type": "execute_result"
324
+ }
325
+ ],
326
+ "source": [
327
+ "model(t['input_ids'])"
328
+ ]
329
+ },
330
+ {
331
+ "cell_type": "code",
332
+ "execution_count": null,
333
+ "metadata": {},
334
+ "outputs": [],
335
+ "source": []
336
+ },
337
+ {
338
+ "cell_type": "code",
339
+ "execution_count": 1,
340
+ "metadata": {},
341
+ "outputs": [
342
+ {
343
+ "data": {
344
+ "application/vnd.jupyter.widget-view+json": {
345
+ "model_id": "36c96d4a680b45329f6f5536ad04e38f",
346
+ "version_major": 2,
347
+ "version_minor": 0
348
+ },
349
+ "text/plain": [
350
+ "tokenizer_config.json: 0%| | 0.00/377 [00:00<?, ?B/s]"
351
+ ]
352
+ },
353
+ "metadata": {},
354
+ "output_type": "display_data"
355
+ },
356
+ {
357
+ "data": {
358
+ "application/vnd.jupyter.widget-view+json": {
359
+ "model_id": "b20871e0bbeb4f249f96f8b678933712",
360
+ "version_major": 2,
361
+ "version_minor": 0
362
+ },
363
+ "text/plain": [
364
+ "vocab.txt: 0%| | 0.00/241k [00:00<?, ?B/s]"
365
+ ]
366
+ },
367
+ "metadata": {},
368
+ "output_type": "display_data"
369
+ },
370
+ {
371
+ "data": {
372
+ "application/vnd.jupyter.widget-view+json": {
373
+ "model_id": "4fb9a55a45e04386aa1cfacc53b84bd6",
374
+ "version_major": 2,
375
+ "version_minor": 0
376
+ },
377
+ "text/plain": [
378
+ "tokenizer.json: 0%| | 0.00/468k [00:00<?, ?B/s]"
379
+ ]
380
+ },
381
+ "metadata": {},
382
+ "output_type": "display_data"
383
+ },
384
+ {
385
+ "data": {
386
+ "application/vnd.jupyter.widget-view+json": {
387
+ "model_id": "37920dd7d41f4f19804848fcf1431b06",
388
+ "version_major": 2,
389
+ "version_minor": 0
390
+ },
391
+ "text/plain": [
392
+ "special_tokens_map.json: 0%| | 0.00/112 [00:00<?, ?B/s]"
393
+ ]
394
+ },
395
+ "metadata": {},
396
+ "output_type": "display_data"
397
+ },
398
+ {
399
+ "data": {
400
+ "application/vnd.jupyter.widget-view+json": {
401
+ "model_id": "1200fc72cc22450d960480fa65e15234",
402
+ "version_major": 2,
403
+ "version_minor": 0
404
+ },
405
+ "text/plain": [
406
+ "config.json: 0%| | 0.00/957 [00:00<?, ?B/s]"
407
+ ]
408
+ },
409
+ "metadata": {},
410
+ "output_type": "display_data"
411
+ },
412
+ {
413
+ "data": {
414
+ "application/vnd.jupyter.widget-view+json": {
415
+ "model_id": "7231e2ea8f6f469992d3d47d37e61c9a",
416
+ "version_major": 2,
417
+ "version_minor": 0
418
+ },
419
+ "text/plain": [
420
+ "model.safetensors: 0%| | 0.00/47.2M [00:00<?, ?B/s]"
421
+ ]
422
+ },
423
+ "metadata": {},
424
+ "output_type": "display_data"
425
+ }
426
+ ],
427
+ "source": []
428
+ },
429
+ {
430
+ "cell_type": "code",
431
+ "execution_count": 4,
432
+ "metadata": {},
433
+ "outputs": [],
434
+ "source": []
435
+ },
436
+ {
437
+ "cell_type": "code",
438
+ "execution_count": null,
439
+ "metadata": {},
440
+ "outputs": [],
441
+ "source": [
442
+ "model"
443
+ ]
444
+ },
445
+ {
446
+ "cell_type": "code",
447
+ "execution_count": null,
448
+ "metadata": {},
449
+ "outputs": [],
450
+ "source": [
451
+ "from ast import mod\n",
452
+ "import pandas as pd\n",
453
+ "import numpy as np\n",
454
+ "\n",
455
+ "from sklearn.model_selection import train_test_split\n",
456
+ "\n",
457
+ "\n",
458
+ "\n",
459
+ "\n",
460
+ "\n",
461
+ "df = pd.read_csv('toxic.csv')\n",
462
+ "\n",
463
+ "x,y=[],[]\n",
464
+ "\n",
465
+ "if 'train_X' not in globals():\n",
466
+ " for i in range(len(df)):\n",
467
+ " if i%100==0:\n",
468
+ " print(i)\n",
469
+ " t=df.iloc[i]['comment']\n",
470
+ "\n",
471
+ " t = model(**tokenizer(t, return_tensors='pt',truncation=True, padding=True))[0].tolist()[0]\n",
472
+ " x.append(t)\n",
473
+ " y.append(df.iloc[i]['toxic'])\n",
474
+ "x = np.array(x)\n",
475
+ "y = np.array(y)\n",
476
+ "\n",
477
+ "train_X, test_X, train_y, test_y = train_test_split(x, y, test_size=0.2, random_state=42)\n",
478
+ "from sklearn.utils.class_weight import compute_class_weight\n",
479
+ "classes = np.unique(y)\n",
480
+ "weights = compute_class_weight(class_weight='balanced', classes=classes, y=y)\n",
481
+ "catboost = CatBoostClassifier( eval_metric='Accuracy',class_weights=weights)\n",
482
+ "catboost.fit(train_X, train_y, verbose=False,plot =True,eval_set=(test_X, test_y))\n",
483
+ "\n",
484
+ "#save\n",
485
+ "torch.save(catboost.state_dict(), 'model.pt')\n",
486
+ "\n",
487
+ "\n",
488
+ "import torch\n",
489
+ "from transformers import AutoTokenizer, AutoModelForSequenceClassification\n",
490
+ "from catboost import CatBoostClassifier\n",
491
+ "import torch.nn as nn\n",
492
+ "catboost_model = catboost.CatBoostClassifier(random_seed=42,eval_metric='Accuracy')\n",
493
+ "catboost_model.load_model(\"catboost_model.cbm\")\n",
494
+ "model_checkpoint = 'cointegrated/rubert-tiny-toxicity'\n",
495
+ "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\n",
496
+ "model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)\n",
497
+ "model.classifier=nn.Dropout(0)\n",
498
+ "model.dropout = nn.Dropout(0)\n",
499
+ "\n",
500
+ "def predict(text):\n",
501
+ " t=tokenizer(text, return_tensors='pt',truncation=True, padding=True)\n",
502
+ " t = model(**t)[0].tolist()[0]\n",
503
+ " return t\n"
504
+ ]
505
+ },
506
+ {
507
+ "cell_type": "code",
508
+ "execution_count": 34,
509
+ "metadata": {},
510
+ "outputs": [],
511
+ "source": [
512
+ "catboost.save_model('dont_be_toxic.cbm')"
513
+ ]
514
+ },
515
+ {
516
+ "cell_type": "code",
517
+ "execution_count": 79,
518
+ "metadata": {},
519
+ "outputs": [
520
+ {
521
+ "data": {
522
+ "text/plain": [
523
+ "array([0.04576194, 0.95423806])"
524
+ ]
525
+ },
526
+ "execution_count": 79,
527
+ "metadata": {},
528
+ "output_type": "execute_result"
529
+ }
530
+ ],
531
+ "source": [
532
+ "import torch\n",
533
+ "from transformers import AutoTokenizer, AutoModelForSequenceClassification\n",
534
+ "from catboost import CatBoostClassifier\n",
535
+ "import torch.nn as nn\n",
536
+ "\n",
537
+ "catboost_model = CatBoostClassifier(random_seed=42,eval_metric='Accuracy')\n",
538
+ "catboost_model.load_model(\"../anti_toxic/dont_be_toxic.cbm\")\n",
539
+ "model_checkpoint = 'cointegrated/rubert-tiny-toxicity'\n",
540
+ "tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\n",
541
+ "model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)\n",
542
+ "model.classifier=nn.Dropout(0)\n",
543
+ "model.dropout = nn.Dropout(0)\n",
544
+ "\n",
545
+ "def predict(text):\n",
546
+ " t=tokenizer(text, return_tensors='pt',truncation=True, padding=True)\n",
547
+ " t = model(**t)[0].tolist()[0]\n",
548
+ " return catboost_model.predict_proba(t)\n"
549
+ ]
550
+ },
551
+ {
552
+ "cell_type": "code",
553
+ "execution_count": 43,
554
+ "metadata": {},
555
+ "outputs": [
556
+ {
557
+ "ename": "IndexError",
558
+ "evalue": "invalid index to scalar variable.",
559
+ "output_type": "error",
560
+ "traceback": [
561
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
562
+ "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
563
+ "Cell \u001b[0;32mIn[43], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mpredict\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mмяу\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",
564
+ "Cell \u001b[0;32mIn[42], line 17\u001b[0m, in \u001b[0;36mpredict\u001b[0;34m(text)\u001b[0m\n\u001b[1;32m 15\u001b[0m t\u001b[38;5;241m=\u001b[39mtokenizer(text, return_tensors\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mpt\u001b[39m\u001b[38;5;124m'\u001b[39m,truncation\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m, padding\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 16\u001b[0m t \u001b[38;5;241m=\u001b[39m model(\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mt)[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39mtolist()[\u001b[38;5;241m0\u001b[39m]\n\u001b[0;32m---> 17\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcatboost_model\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpredict_proba\u001b[49m\u001b[43m(\u001b[49m\u001b[43mt\u001b[49m\u001b[43m)\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m]\u001b[49m\n",
565
+ "\u001b[0;31mIndexError\u001b[0m: invalid index to scalar variable."
566
+ ]
567
+ }
568
+ ],
569
+ "source": []
570
+ },
571
+ {
572
+ "cell_type": "code",
573
+ "execution_count": 33,
574
+ "metadata": {},
575
+ "outputs": [
576
+ {
577
+ "data": {
578
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAApIAAAIjCAYAAACwHvu2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAABT3UlEQVR4nO3de3zP9f//8ft72MHYCdusnAmTHIvl/LHMIRHSoppSDk2OOVXkUA05q4xPxRKVDlYU2cdiYbGmRZKQQ8WMHGbDNtv794ev9693m2yv9vZ+2/t27fK6XHo/X8/X8/V4vT8f9ejxfL6eb5PZbDYLAAAAKCIXewcAAACAWxOJJAAAAAwhkQQAAIAhJJIAAAAwhEQSAAAAhpBIAgAAwBASSQAAABhCIgkAAABDSCQBAABgCIkkgH904MABderUSd7e3jKZTIqNjS3W8Y8cOSKTyaTly5cX67i3svbt26t9+/b2DgMAbohEErgFHDp0SIMHD1bNmjXl7u4uLy8vtWrVSgsWLNClS5dseu+IiAjt2bNHr7zyilasWKHmzZvb9H4304ABA2QymeTl5VXg93jgwAGZTCaZTCbNnj27yOMfP35cU6ZMUUpKSjFECwCOp7S9AwDwz7744gs99NBDcnNz0+OPP64777xT2dnZ2rp1q8aOHau9e/dq6dKlNrn3pUuXlJiYqBdeeEHDhg2zyT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jgGMgkYTNDRgwQCaTSTNmzLBqj42NlclkslNUAGzNZDL94zFlyhTDY9977706ceKEvL29iy9gAEVGIombwt3dXTNnztTZs2eLbczs7OxiGwtA8Ttx4oTlmD9/vry8vKzannvuOcNju7q6KjAwkP8YBeyMRBI3RWhoqAIDAxUVFXXdPp988okaNGggNzc3Va9eXXPmzLE6X716dU2fPl2PP/64vLy8NGjQIC1fvlw+Pj5at26d6tatq7Jly6pPnz66ePGiYmJiVL16dfn6+mr48OHKzc21jLVixQo1b95c5cuXV2BgoPr166e0tDSbPT/gjAIDAy2Ht7e3TCaT5bO/v7/mzp2r22+/XW5ubmrcuLE2bNggSTKbzQoNDVVYWJiu7VB35swZ3X777Zo8ebKkgqe2t23bpvbt26ts2bLy9fVVWFhYsf7HK4D8SCRxU5QqVUqvvvqqFi1apN9//z3f+eTkZPXt21fh4eHas2ePpkyZokmTJmn58uVW/WbPnq1GjRrp+++/16RJkyRJFy9e1MKFC/XBBx9ow4YN2rx5sx588EF9+eWX+vLLL7VixQotWbJEH3/8sWWcnJwcTZ8+XT/88INiY2N15MgRDRgwwJZfAYC/WLBggebMmaPZs2dr9+7dCgsL0wMPPKADBw7IZDIpJiZGSUlJWrhwoSRpyJAhuu222yyJ5N+lpKSoY8eOCg4OVmJiorZu3aru3btb/QckABswAzYWERFh7tGjh9lsNptbtmxpfvLJJ81ms9m8Zs0a87X/C/br18983333WV03duxYc3BwsOVztWrVzD179rTqs2zZMrMk88GDBy1tgwcPNpctW9Z84cIFS1tYWJh58ODB140xKSnJLMlyzddff22WZD579mzRHxhAPsuWLTN7e3tbPgcFBZlfeeUVqz533323+ZlnnrF8Xr16tdnd3d08YcIEs6enp/mXX36xnPv7n9FHHnnE3KpVK5s+A4D8qEjippo5c6ZiYmK0b98+q/Z9+/apVatWVm2tWrXSgQMHrCoKzZs3zzdm2bJlVatWLcvngIAAVa9eXeXKlbNq++vUdXJysrp3766qVauqfPnyateunSTp2LFj/+4BAdxQenq6jh8/XuCf+b/+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6p2NhYy5irV6+WJFWrVk0mk0nr1q3TqVOnlJGRofLly+u5557TqFGjFBMTo0OHDmnXrl1atGiRYmJiJElDhgzRgQMHNHbsWO3fv1+rVq3S8uXLbf0VAcAtiUQSgM2VLVtWCQkJqlq1qnr16qX69etr4MCBunz5sqVCOWbMGD322GOKiIhQSEiIypcvrwcffPAfx128eLH69OmjZ555RvXq1dPTTz+tzMxMSdJtt92mqVOnasKECQoICNCwYcMkSdOnT9ekSZMUFRWl+vXrq3Pnzvriiy9Uo0YNSVLVqlX1ySefKDY2Vo0aNVJ0dLReffVVG347AHDrMpmvt5IdAAAA+AdUJAEAAGAIiSQAAAAMIZEEAACAISSSAAAAMIREEgAAAIaQSAIAAMAQEkkAAAAYQiIJAAAAQ0gkAQAAYAiJJAAAAAwhkQQAAIAh/w+XY9rUe4TJXwAAAABJRU5ErkJggg==",
579
+ "text/plain": [
580
+ "<Figure size 800x600 with 2 Axes>"
581
+ ]
582
+ },
583
+ "metadata": {},
584
+ "output_type": "display_data"
585
+ },
586
+ {
587
+ "name": "stdout",
588
+ "output_type": "stream",
589
+ "text": [
590
+ "Weighted F1-score: 0.8761177534326371\n",
591
+ "Classification Report:\n",
592
+ " precision recall f1-score support\n",
593
+ "\n",
594
+ " Normal 0.88 0.93 0.91 1847\n",
595
+ " Toxic 0.86 0.78 0.82 1036\n",
596
+ "\n",
597
+ " accuracy 0.88 2883\n",
598
+ " macro avg 0.87 0.86 0.86 2883\n",
599
+ "weighted avg 0.88 0.88 0.88 2883\n",
600
+ "\n"
601
+ ]
602
+ }
603
+ ],
604
+ "source": [
605
+ "\n",
606
+ "import torch\n",
607
+ "\n",
608
+ "\n",
609
+ "\n",
610
+ "def ultrareport(all_preds, all_targets,classes):\n",
611
+ " import matplotlib.pyplot as plt\n",
612
+ " import seaborn as sns\n",
613
+ " from sklearn.metrics import confusion_matrix, classification_report, f1_score\n",
614
+ "\n",
615
+ " def plot_confusion_matrix(y_true, y_pred, classes):\n",
616
+ " cm = confusion_matrix(y_true, y_pred)\n",
617
+ " plt.figure(figsize=(8, 6))\n",
618
+ " sns.heatmap(cm, annot=True, fmt=\"d\", cmap=\"Blues\", xticklabels=classes, yticklabels=classes)\n",
619
+ " plt.xlabel('Predicted')\n",
620
+ " plt.ylabel('Actual')\n",
621
+ " plt.title('Confusion Matrix')\n",
622
+ " plt.show()\n",
623
+ "\n",
624
+ "\n",
625
+ " plot_confusion_matrix(all_targets, all_preds, classes)\n",
626
+ "\n",
627
+ " f1 = f1_score(all_targets, all_preds, average='weighted')\n",
628
+ " report = classification_report(all_targets, all_preds, target_names=classes)\n",
629
+ " print(\"Weighted F1-score:\", f1)\n",
630
+ " print(\"Classification Report:\")\n",
631
+ " print(report)\n",
632
+ "\n",
633
+ "classes = [\"Normal\", \"Toxic\"]\n",
634
+ "all_preds, all_targets = test_y, catboost.predict(test_X)\n",
635
+ "ultrareport(all_preds, all_targets,classes)\n"
636
+ ]
637
+ },
638
+ {
639
+ "cell_type": "code",
640
+ "execution_count": 29,
641
+ "metadata": {},
642
+ "outputs": [
643
+ {
644
+ "data": {
645
+ "text/plain": [
646
+ "array([5. , 0.55555556])"
647
+ ]
648
+ },
649
+ "execution_count": 29,
650
+ "metadata": {},
651
+ "output_type": "execute_result"
652
+ }
653
+ ],
654
+ "source": [
655
+ "weights"
656
+ ]
657
+ },
658
+ {
659
+ "cell_type": "code",
660
+ "execution_count": 25,
661
+ "metadata": {},
662
+ "outputs": [
663
+ {
664
+ "data": {
665
+ "text/plain": [
666
+ "count 14412.000000\n",
667
+ "mean 0.334860\n",
668
+ "std 0.471958\n",
669
+ "min 0.000000\n",
670
+ "25% 0.000000\n",
671
+ "50% 0.000000\n",
672
+ "75% 1.000000\n",
673
+ "max 1.000000\n",
674
+ "Name: toxic, dtype: float64"
675
+ ]
676
+ },
677
+ "execution_count": 25,
678
+ "metadata": {},
679
+ "output_type": "execute_result"
680
+ }
681
+ ],
682
+ "source": [
683
+ "df['toxic'].describe()"
684
+ ]
685
+ }
686
+ ],
687
+ "metadata": {
688
+ "kernelspec": {
689
+ "display_name": "cv",
690
+ "language": "python",
691
+ "name": "python3"
692
+ },
693
+ "language_info": {
694
+ "codemirror_mode": {
695
+ "name": "ipython",
696
+ "version": 3
697
+ },
698
+ "file_extension": ".py",
699
+ "mimetype": "text/x-python",
700
+ "name": "python",
701
+ "nbconvert_exporter": "python",
702
+ "pygments_lexer": "ipython3",
703
+ "version": "3.12.2"
704
+ }
705
+ },
706
+ "nbformat": 4,
707
+ "nbformat_minor": 2
708
+ }
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Pillow==10.3.0
2
+ pytorch_lightning==2.2.1
3
+ streamlit==1.32.2
4
+ torch==2.2.2
5
+ transformers==4.39.3