Best Python code snippet using SeleniumBase
settings_class.py
Source:settings_class.py
...74 self.ui.par3_label.setToolTip(tooltip)75 self.ui.bool_check1.setVisible(True)76 self.ui.par2_label.setText("Nesterov")77 self.ui.par2_label.setToolTip("ÐÑименÑÑÑ Ð»Ð¸ импÑлÑÑ ÐеÑÑеÑова")78 self.logic.hide_elements(self.ui, 3, bool_num=1)79 self.ui.par2.setVisible(False)80 self.resize(300, 230)81 self.ui.buttons.move(110, 180)8283 elif self.ui.list.currentText() == "RMSprop" or opt == "RMSprop":84 self.ui.par2_label.setText("Centered")85 tooltip = "ÐÑли True, гÑÐ°Ð´Ð¸ÐµÐ½Ñ Ð½Ð¾Ñмализован оÑеноÑнÑм ÑазлиÑием гÑадиенÑа."86 tooltip += "\nÐÑли False, Ñо неÑенÑÑиÑованнÑм вÑоÑÑм моменÑом"87 self.ui.par2_label.setToolTip(tooltip)88 self.ui.bool_check1.setVisible(True)89 self.ui.par3_label.setText("Momentum")90 tooltip = "ÐÑвеÑÐ°ÐµÑ Ð·Ð° накапливание гÑадиенÑного ÑпÑÑка\nв необÑ
одимом напÑавлении и гаÑение колебаний обÑÑениÑ"91 self.ui.par3_label.setToolTip(tooltip)92 self.ui.par4_label.setText("Rho")93 tooltip = "ÐонижаÑÑий ÑакÑÐ¾Ñ Ð´Ð»Ñ Ð¸ÑÑоÑии гÑадиенÑа"94 self.ui.par4_label.setToolTip(tooltip)95 self.ui.par5_label.setText("Epsilon")96 tooltip = "ÐаленÑÐºÐ°Ñ ÐºÐ¾Ð½ÑÑанÑа Ð´Ð»Ñ ÑиÑловой ÑÑабилÑноÑÑи"97 self.ui.par5_label.setToolTip(tooltip)98 self.logic.hide_elements(self.ui, 5, bool_num=1)99 self.ui.par2.setVisible(False)100 self.resize(300, 300)101 self.ui.buttons.move(110, 260)102 103 elif self.ui.list.currentText() == "Adam" or opt == "Adam":104 self.ui.par2_label.setText("Amsgrad")105 tooltip = "ÐÑименÑÑÑ Ð¸Ð»Ð¸ Ð½ÐµÑ AMSGrad ваÑÐ¸Ð°Ð½Ñ ÑÑого алгоÑиÑма опÑимизаÑии"106 self.ui.par2_label.setToolTip(tooltip)107 self.ui.bool_check1.setVisible(True)108 self.ui.par3_label.setText("Epsilon")109 tooltip = "ÐаленÑÐºÐ°Ñ ÐºÐ¾Ð½ÑÑанÑа Ð´Ð»Ñ ÑиÑловой ÑÑабилÑноÑÑи"110 self.ui.par3_label.setToolTip(tooltip)111 self.ui.par4_label.setText("Beta_1")112 tooltip = "ÐкÑпоненÑионалÑÐ½Ð°Ñ ÑÑавка ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¿ÐµÑвого моменÑа оÑенки"113 self.ui.par4_label.setToolTip(tooltip)114 self.ui.par5_label.setText("Beta_2")115 tooltip = "ÐкÑпоненÑионалÑÐ½Ð°Ñ ÑÑавка ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²ÑоÑого моменÑа оÑенки"116 self.ui.par5_label.setToolTip(tooltip)117 self.logic.hide_elements(self.ui, 5, bool_num=1)118 self.ui.par2.setVisible(False)119 self.resize(300, 300)120 self.ui.buttons.move(110, 260)121 122 elif self.ui.list.currentText() == "Adadelta" or opt == "Adadelta":123 self.ui.par2_label.setText("Rho")124 tooltip = "ÐонижаÑÑий ÑакÑÐ¾Ñ Ð´Ð»Ñ Ð¸ÑÑоÑии гÑадиенÑа"125 self.ui.par2_label.setToolTip(tooltip)126 self.ui.par3_label.setText("Epsilon")127 tooltip = "ÐаленÑÐºÐ°Ñ ÐºÐ¾Ð½ÑÑанÑа Ð´Ð»Ñ ÑиÑловой ÑÑабилÑноÑÑи"128 self.ui.par3_label.setToolTip(tooltip)129 self.logic.hide_elements(self.ui, 3)130 self.resize(300, 230)131 self.ui.buttons.move(110, 180)132 133 elif self.ui.list.currentText() == "Nadam" or opt == "Nadam":134 self.ui.par2_label.setText("Epsilon")135 tooltip = "ÐаленÑÐºÐ°Ñ ÐºÐ¾Ð½ÑÑанÑа Ð´Ð»Ñ ÑиÑловой ÑÑабилÑноÑÑи"136 self.ui.par2_label.setToolTip(tooltip)137 self.ui.par3_label.setText("Beta_1")138 tooltip = "ÐкÑпоненÑионалÑÐ½Ð°Ñ ÑÑавка ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¿ÐµÑвого моменÑа оÑенки"139 self.ui.par3_label.setToolTip(tooltip)140 self.ui.par4_label.setText("Beta_2")141 tooltip = "ÐкÑпоненÑионалÑÐ½Ð°Ñ ÑÑавка ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²ÑоÑого моменÑа оÑенки"142 self.ui.par4_label.setToolTip(tooltip)143 self.logic.hide_elements(self.ui, 4)144 self.resize(300, 260)145 self.ui.buttons.move(110, 220)146 147 elif self.ui.list.currentText() == "Adagrad" or opt == "Adagrad":148 self.ui.par2_label.setText("Epsilon")149 tooltip = "ÐаленÑÐºÐ°Ñ ÐºÐ¾Ð½ÑÑанÑа Ð´Ð»Ñ ÑиÑловой ÑÑабилÑноÑÑи"150 self.ui.par2_label.setToolTip(tooltip)151 self.ui.par3_label.setText("Initial_accum_value")152 tooltip = "ÐаÑалÑное знаÑение Ð´Ð»Ñ Ð°ÐºÐºÑмÑлÑÑоÑов (пÑепаÑамеÑÑ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ momentum)"153 self.ui.par3_label.setToolTip(tooltip)154 self.logic.hide_elements(self.ui, 3)155 self.resize(300, 230)156 self.ui.buttons.move(110, 180)157 158 elif self.ui.list.currentText() == "Adamax" or opt == "Adamax":159 self.ui.par2_label.setText("Epsilon")160 tooltip = "ÐаленÑÐºÐ°Ñ ÐºÐ¾Ð½ÑÑанÑа Ð´Ð»Ñ ÑиÑловой ÑÑабилÑноÑÑи"161 self.ui.par2_label.setToolTip(tooltip)162 self.ui.par3_label.setText("Beta_1")163 tooltip = "ÐкÑпоненÑионалÑÐ½Ð°Ñ ÑÑавка ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¿ÐµÑвого моменÑа оÑенки"164 self.ui.par3_label.setToolTip(tooltip)165 self.ui.par4_label.setText("Beta_2")166 tooltip = "ÐкÑпоненÑионалÑÐ½Ð°Ñ ÑÑавка ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²ÑоÑого моменÑа оÑенки"167 self.ui.par4_label.setToolTip(tooltip)168 self.logic.hide_elements(self.ui, 4)169 self.resize(300, 260)170 self.ui.buttons.move(110, 220)171 172 elif self.ui.list.currentText() == "Ftrl" or opt == "Ftrl":173 self.ui.par2_label.setText("Initial_accum_value")174 tooltip = "ÐаÑалÑное знаÑение Ð´Ð»Ñ Ð°ÐºÐºÑмÑлÑÑоÑов (пÑепаÑамеÑÑ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ momentum)"175 self.ui.par2_label.setToolTip(tooltip)176 self.ui.par3_label.setText("L1_regul_strength")177 tooltip = "Ðолжно бÑÑÑ Ð¼ÐµÐ½ÑÑе или Ñавно 0"178 self.ui.par3_label.setToolTip(tooltip)179 self.ui.par4_label.setText("L2_regul_strength")180 self.ui.par4_label.setToolTip(tooltip)181 self.ui.par4.setVisible(True)182 self.ui.par5_label.setText("L2_shrinkage")183 tooltip = "ÐÑлиÑаеÑÑÑ Ð¾Ñ L2 вÑÑе Ñем, ÑÑо Ñо ÑÑабилизаÑионнÑе ÑÑÑаÑÑ,"184 tooltip += "\nа shrinkage ÑÑÑаÑÑ Ð¼Ð°Ð³Ð½Ð¸ÑÑдÑ."185 tooltip += "\nÐогда вÑ
однÑе даннÑе ÑазÑеженнÑе, ÑÑадка бÑÐ´ÐµÑ ÑолÑко на акÑивнÑÑ
веÑаÑ
"186 self.ui.par5_label.setToolTip(tooltip)187 self.ui.par5.setVisible(True)188 self.ui.par6_label.setText("Beta")189 tooltip = "ÐÑедÑÑавлÑÐµÑ beta-знаÑение из оÑигиналÑной ÑабоÑÑ"190 self.ui.par6_label.setToolTip(tooltip)191 self.ui.par6.setVisible(True)192 self.ui.par7_label.setText("Lr_power")193 tooltip = "ÐонÑÑолиÑÑеÑ, как обÑÑаÑÑÐ°Ñ ÑÑавка ÑнижаеÑÑÑ Ð¿Ñи обÑÑении."194 tooltip += "\nÐолжно бÑÑÑ Ð¼ÐµÐ½ÑÑе или Ñавно 0"195 self.ui.par7_label.setToolTip(tooltip)196 self.ui.par7.setVisible(True)197 self.logic.hide_elements(self.ui, 7)198 self.resize(300, 380)199 self.ui.buttons.move(110, 340)200201 def choice_losses(self, loss=None):202 self.ui.par1_label.setText("Reduction")203 tooltip = "ÐаÑамеÑÑ, Ñ
аÑакÑеÑизÑÑÑий иÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿Ñии понижениÑ"204 self.ui.par1_label.setToolTip(tooltip)205 if (self.ui.list.currentText() == "BinaryCrossentropy" or loss == "BinaryCrossentropy") or (206 self.ui.list.currentText() == "CategoricalCrossentropy" or loss == "CategoricalCrossentropy"):207 self.ui.par2_label.setText("From logits")208 self.ui.par3_label.setText("Label smoothing")209 self.logic.hide_elements(self.ui, 3, bool_num=1)210 self.ui.par2.setVisible(False)211 self.resize(300, 230)212 self.ui.buttons.move(110, 180)213214 elif (self.ui.list.currentText() == "SparseCategorical") or (loss == "SparseCategorical"):215 self.ui.par2_label.setText("From logits")216 self.logic.hide_elements(self.ui, 2, bool_num=1)217 self.ui.par2.setVisible(False)218 self.resize(300, 230)219 self.ui.buttons.move(110, 180)220221 elif (self.ui.list.currentText() == "Huber") or (loss == "Huber"):222 self.ui.par2_label.setText("Delta")223 self.ui.par2_label.setToolTip("ÐнаÑÐµÐ½Ð¸Ñ ÑоÑки, где ÑÑнкÑÐ¸Ñ Ð¼ÐµÐ½ÑеÑÑÑ Ñ ÐºÐ²Ð°Ð´ÑаÑиÑеÑкой на линейнÑÑ")224 self.logic.hide_elements(self.ui, 2)225 self.resize(300, 230)226 self.ui.buttons.move(110, 180)227228 elif (self.ui.list.currentText() == "Poisson" or loss == "Poison") or (229 self.ui.list.currentText() == "MSE" or loss == "MSE") or (230 self.ui.list.currentText() == "MAE" or loss == "MAE") or (231 self.ui.list.currentText() == "MAEPercentage" or loss == "MAEPercentage") or (232 self.ui.list.currentText() == "MSEPLogarithmic" or loss == "MSEPLogarithmic") or (233 self.ui.list.currentText() == "Hinge" or loss == "Hinge") or (234 self.ui.list.currentText() == "SquaredHinge" or loss == "SquaredHinge") or (235 self.ui.list.currentText() == "CategoricalHinge" or loss == "CategoricalHinge") or (236 self.ui.list.currentText() == "LogCosh" or loss == "LogCosh") or (237 self.ui.list.currentText() == "KLDivergence" or loss == "KLDivergence"):238 self.logic.hide_elements(self.ui, 1)239 self.resize(300, 230)240 self.ui.buttons.move(110, 180)241242 elif self.ui.list.currentText() == "CosineSimilarity" or loss == "CosineSimilarity":243 self.ui.par2_label.setText("Axis")244 tooltip = "ÐÑÑ, Ð²Ð´Ð¾Ð»Ñ ÐºÐ¾ÑоÑой Ð´Ð°Ð½Ð½Ð°Ñ ÑÑнкÑÐ¸Ñ Ð¿Ð¾ÑеÑÑ Ð²ÑÑиÑлÑеÑÑÑ (оÑÑ Ð¿Ñизнаков)"245 self.ui.par2_label.setToolTip(tooltip)246 self.logic.hide_elements(self.ui, 2)247 self.resize(300, 230)248 self.ui.buttons.move(110, 180)249 250 def choice_metrics(self, metric=None):251 self.ui.par1_label.setText("Dtype")252 self.ui.par1_label.setToolTip("Тип даннÑÑ
Ð´Ð»Ñ ÑезÑлÑÑаÑов меÑÑики")253 if (self.ui.list.currentText() == "Accuracy" or metric == "Accuracy") or (254 self.ui.list.currentText() == "CategoricalAccuracy" or metric == "CategoricalAccuracy") or (255 self.ui.list.currentText() == "SparseCategorical" or metric == "SparseCategorical") or (256 self.ui.list.currentText() == "Hinge" or metric == "Hinge") or (257 self.ui.list.currentText() == "SquaredHinge" or metric == "SquaredHinge") or (258 self.ui.list.currentText() == "CategoricalHinge" or metric == "CategoricalHinge") or (259 self.ui.list.currentText() == "KLDivergence" or metric == "KLDivergence") or (260 self.ui.list.currentText() == "Poisson" or metric == "Poisson") or (261 self.ui.list.currentText() == "MSE" or metric == "MSE") or (262 self.ui.list.currentText() == "RootMSE" or metric == "RootMSE") or (263 self.ui.list.currentText() == "MAE" or metric == "MAE") or (264 self.ui.list.currentText() == "MAEPercentage" or metric == "MAEPercentage") or (265 self.ui.list.currentText() == "MSELogarithmic" or metric == "MSELogarithmic") or (266 self.ui.list.currentText() == "LogCoshError" or metric == "LogCoshError"):267 self.logic.hide_elements(self.ui, 1)268 self.resize(300, 230)269 self.ui.buttons.move(110, 180)270271 elif (self.ui.list.currentText() == "TopKCategorical" or metric == "TopKCategorical") or (272 self.ui.list.currentText() == "SparseTopKCategorical" or metric == "SparseTopKCategorical"):273 self.ui.par2_label.setText("K")274 self.ui.par2_label.setToolTip("ЧиÑло веÑÑ
ниÑ
ÑлеменÑов Ð´Ð»Ñ ÑаÑÑÑÑа меÑÑики")275 self.logic.hide_elements(self.ui, 2)276 self.resize(300, 230)277 self.ui.buttons.move(110, 180)278279 elif (self.ui.list.currentText() == "BinaryAccuracy" or metric == "BinaryAccuracy"):280 self.ui.par2_label.setText("Threshold")281 self.ui.par2_label.setToolTip("ÐоÑог Ð´Ð»Ñ ÑеÑениÑ, 1 ли пÑедÑказание или 0")282 self.logic.hide_elements(self.ui, 2)283 self.resize(300, 230)284 self.ui.buttons.move(110, 180)285286 elif self.ui.list.currentText() == "AUC" or metric == "AUC":287 self.ui.par2_label.setText("Multi_label")288 tooltip = "ÐÑжно ли ÑÑиÑаÑÑ Ñ Ð¼Ð½Ð¾Ð³Ð¸Ð¼Ð¸ клаÑÑами меÑок.\n"289 tooltip += "Тогда меÑÑика ÑÑиÑаеÑÑÑ Ð¾ÑделÑно Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ клаÑÑа и ÑÑÑеднÑеÑÑÑ.\n"290 tooltip += "ÐнÑае меÑки клаÑÑов делаÑÑÑÑ Ð¿Ð»Ð¾Ñкими пеÑед ÑаÑÑÑÑами меÑÑик\n"291 self.ui.par2_label.setToolTip(tooltip)292 self.ui.par3_label.setText("From logits")293 self.ui.par3_label.setToolTip("ÐÑдÑÑ Ð»Ð¸ пÑедÑÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð²ÐµÑоÑÑноÑÑÑми или знаÑениÑми ÑигмоидÑ")294 self.ui.par4_label.setText("Num thresholds")295 self.ui.par4_label.setToolTip("ЧиÑло поÑогов, иÑполÑзÑÑÑеÑÑÑ ÐºÐ¾Ð³Ð´Ð° диÑкÑеÑизиÑÑеÑÑÑ ÐºÑÐ¸Ð²Ð°Ñ Ð¼ÐµÑÑики")296 self.ui.par5_label.setText("Curve")297 self.ui.par5_label.setToolTip("ÐÐ¼Ñ ÐºÑивой Ð´Ð»Ñ ÑаÑÑÑÑа меÑÑики")298 self.ui.par6_label.setText("Summation method")299 tooltip = "ÐпиÑÑÐ²Ð°ÐµÑ Ð¼ÐµÑод Riemann summation.\n"300 tooltip += "РзавиÑимоÑÑи Ð¾Ñ Ð²Ð²ÐµÐ´Ñнного знаÑениÑ, изменÑÑÑÑÑ ÑпоÑоб ÑÑммаÑии"301 self.ui.par6_label.setToolTip(tooltip)302 self.ui.par7_label.setText("Thresholds")303 tooltip = "пиÑок знаÑений, иÑполÑзÑÑÑиÑ
ÑÑ ÐºÐ°Ðº поÑог Ð´Ð»Ñ Ð´Ð¸ÑкÑеÑизаÑии кÑивой\n"304 tooltip += "ÐÑли ÑÑÑановлено, Ñо паÑамеÑÑ Num thresholds игноÑиÑÑеÑÑÑ"305 self.ui.par7_label.setToolTip(tooltip)306 self.ui.par8_label.setText("Labels weights") 307 tooltip = "СпиÑок, маÑÑив или ÑÐµÐ½Ð·Ð¾Ñ Ð½ÐµÐ¾ÑÑиÑаÑелÑнÑÑ
веÑов Ð´Ð»Ñ ÑаÑÑÑÑÑа меÑÑики Ð´Ð»Ñ Ð¼Ð½Ð¾Ð³Ð¾ÐºÐ»Ð°ÑÑовÑÑ
даннÑÑ
\n"308 tooltip = "ÐведиÑе знаÑÐµÐ½Ð¸Ñ ÑеÑез запÑÑÑÑ"309 self.ui.par8_label.setToolTip(tooltip)310 self.logic.hide_elements(self.ui, 8, bool_num=2)311 self.ui.par2.setVisible(False)312 self.ui.par3.setVisible(False)313 self.resize(300, 420)314 self.ui.buttons.move(110, 380)315316 elif (self.ui.list.currentText() == "Precision" or metric == "Precision") or (317 self.ui.list.currentText() == "Recall" or metric == "Recall"):318 self.ui.par2_label.setText("Thresholds")319 self.ui.par2_label.setToolTip("ÐоÑог Ð´Ð»Ñ ÑеÑениÑ, 1 ли пÑедÑказание или 0")320 self.ui.par3_label.setText("Top K")321 self.ui.par3_label.setToolTip("ÐолиÑеÑÑво веÑÑ
ниÑ
пÑедÑказаний Ð´Ð»Ñ Ð¿ÑÐµÐ´Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¾ необÑ
одимоÑÑи ÑаÑÑÑÑÑа меÑÑики")322 self.ui.par4_label.setText("Class ID")323 self.ui.par4_label.setToolTip("ЦелоÑиÑленное ID Ð´Ð»Ñ ÐºÐ¾ÑоÑого нÑÐ¶Ð½Ñ Ð±Ð¸Ð½Ð°ÑнÑе меÑÑики")324 self.logic.hide_elements(self.ui, 4)325 self.resize(300, 260)326 self.ui.buttons.move(110, 220)327328 elif (self.ui.list.currentText() == "TruePositives" or metric == "TruePositives") or (329 self.ui.list.currentText() == "TrueNegatives" or metric == "TrueNegatives") or (330 self.ui.list.currentText() == "FalsePositives" or metric == "FalsePositives") or (331 self.ui.list.currentText() == "FalseNegatives" or metric == "FalseNegatives"):332 self.ui.par2_label.setText("Thresholds")333 self.ui.par2_label.setToolTip("ÐоÑог Ð´Ð»Ñ ÑеÑениÑ, 1 ли пÑедÑказание или 0")334 self.logic.hide_elements(self.ui, 2)335 self.resize(300, 230)336 self.ui.buttons.move(110, 180)337 338 elif (self.ui.list.currentText() == "PrecisionAtRecall" or metric == "PrecisionAtRecall"):339 self.ui.par2_label.setText("Recall")340 self.ui.par2_label.setToolTip("СкалÑÑное знаÑение Ð¾Ñ 0 до 1")341 self.ui.par3_label.setText("Num thresholds")342 self.ui.par3_label.setToolTip("ÐолиÑеÑÑво поÑоговÑÑ
знаÑений Ð´Ð»Ñ ÑаÑÑÑÑÑа меÑÑики")343 self.logic.hide_elements(self.ui, 3)344 self.resize(300, 230)345 self.ui.buttons.move(110, 180)346347 elif (self.ui.list.currentText() == "SensitivityAtSpecificity" or metric == "SensitivityAtSpecificity"):348 self.ui.par2_label.setText("Specificity")349 self.ui.par2_label.setToolTip("СкалÑÑное знаÑение Ð¾Ñ 0 до 1")350 self.ui.par3_label.setText("Num thresholds")351 self.ui.par3_label.setToolTip("ÐолиÑеÑÑво поÑоговÑÑ
знаÑений Ð´Ð»Ñ ÑаÑÑÑÑÑа меÑÑики")352 self.logic.hide_elements(self.ui, 3)353 self.resize(300, 230)354 self.ui.buttons.move(110, 180)355356 elif (self.ui.list.currentText() == "SpecificityAtSensitivity" or metric == "SpecificityAtSensitivity"):357 self.ui.par2_label.setText("Sensitivity")358 self.ui.par2_label.setToolTip("СкалÑÑное знаÑение Ð¾Ñ 0 до 1")359 self.ui.par3_label.setText("Num thresholds")360 self.ui.par3_label.setToolTip("ÐолиÑеÑÑво поÑоговÑÑ
знаÑений Ð´Ð»Ñ ÑаÑÑÑÑÑа меÑÑики")361 self.logic.hide_elements(self.ui, 3)362 self.resize(300, 230)363 self.ui.buttons.move(110, 180)364365 elif (self.ui.list.currentText() == "MeanIoU" or metric == "MeanIou"):366 self.ui.par2_label.setText("Num classes")367 self.ui.par2_label.setToolTip("Ðозможное ÑиÑло клаÑÑов Ð´Ð»Ñ ÐºÐ»Ð°ÑÑиÑикаÑии")368 self.logic.hide_elements(self.ui, 2)369 self.resize(300, 230)370 self.ui.buttons.move(110, 180)371372 elif (self.ui.list.currentText() == "BinaryCrossentropy" or metric == "BinaryCrossentropy") or (373 self.ui.list.currentText() == "CategoricalCrossentropy" or metric == "CategoricalCrossentropy"):374 self.ui.par2_label.setText("From logits")375 self.ui.par2_label.setToolTip("ÐÑÐ´ÐµÑ Ð»Ð¸ вÑÑ
однÑе даннÑе логиÑеÑким ÑензоÑом")376 self.ui.par3_label.setText("Label smoothing")377 self.ui.par3_label.setToolTip("ÐнаÑение, вÑÑажаÑÑее Ñглаживание пÑедÑказÑваемÑÑ
меÑок")378 self.logic.hide_elements(self.ui, 3, bool_num=1)379 self.ui.par2.setVisible(False)380 self.resize(300, 230)381 self.ui.buttons.move(110, 180)382383 elif (self.ui.list.currentText() == "SparseCategorical" or metric == "SparseCategorical"):384 self.ui.par2_label.setText("From logits")385 self.ui.par2_label.setToolTip("ÐÑÐ´ÐµÑ Ð»Ð¸ вÑÑ
однÑе даннÑе логиÑеÑким ÑензоÑом")386 self.ui.par3_label.setText("Axis")387 self.ui.par3_label.setToolTip("ÐÑÑ, Ð²Ð´Ð¾Ð»Ñ ÐºÐ¾ÑоÑой меÑÑика вÑÑÑиÑÑваеÑÑÑ")388 self.logic.hide_elements(self.ui, 3, bool_num=1)389 self.ui.par2.setVisible(False)390 self.resize(300, 230)391 self.ui.buttons.move(110, 180)392393 elif (self.ui.list.currentText() == "CosineSimilarity" or metric == "CosineSimilarity"):394 self.ui.par2_label.setText("Axis")395 self.ui.par2_label.setToolTip("ÐÑÑ, Ð²Ð´Ð¾Ð»Ñ ÐºÐ¾ÑоÑой меÑÑика вÑÑÑиÑÑваеÑÑÑ")396 self.logic.hide_elements(self.ui, 2)397 self.resize(300, 230)398 self.ui.buttons.move(110, 180) 399400 def choice_callbacks(self, callback=None):401 if self.ui.list.currentText() == "BackupAndRestore" or callback == "BackupAndRestore":402 self.ui.par1_label.setText("BackupDir")403 tooltip = "ÐÑÑÑ Ðº папке, где ÑоÑ
ÑанÑÑÑÑÑ ÑÐ°Ð¹Ð»Ñ Ð´Ð»Ñ Ð²Ð¾ÑÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð´ÐµÐ»Ð¸\nпÑи неожиданном завеÑÑении обÑÑениÑ"404 self.ui.par1_label.setToolTip(tooltip)405 self.logic.hide_elements(self.ui, 1)406 self.resize(300, 230)407 self.ui.buttons.move(110, 180)408409 elif self.ui.list.currentText() == "CSVLogger" or callback == "CSVLogger":410 self.ui.par1_label.setText("Filename")411 self.ui.par1_label.setToolTip("ÐÑÑÑ Ðº CSV-ÑайлÑ")412 self.ui.par2_label.setText("Append")413 tooltip = "ÐобавлÑÑÑ Ð·Ð°Ð¿Ð¸Ñи в Ñайл или пеÑепиÑаÑÑ ÐµÐ³Ð¾ заново"414 self.ui.par2_label.setToolTip(tooltip)415 self.ui.par3_label.setText("Separator")416 self.ui.par3_label.setToolTip("РазделиÑÐµÐ»Ñ Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñей в Ñайле")417 self.logic.hide_elements(self.ui, 3, bool_num=1)418 self.ui.par2.setVisible(False)419 self.resize(300, 230)420 self.ui.buttons.move(110, 180)421422 elif self.ui.list.currentText() == "EarlyStopping" or callback == "EarlyStopping":423 self.ui.par1_label.setText("Monitor")424 self.ui.par1_label.setToolTip("ÐолиÑеÑÑво запиÑей Ð´Ð»Ñ Ð¼Ð¾Ð½Ð¸ÑоÑинга")425 self.ui.par2_label.setText("Restore_best_weight")426 tooltip = "Ð¥ÑаниÑÑ Ð»Ð¸ веÑа модели Ñ Ð»ÑÑÑим знаÑением обÑÑениÑ\n"427 tooltip += "ÐÑли False, Ñо веÑа бÑдÑÑ ÑоÑ
ÑанÑÑÑÑÑ Ð²Ð½Ðµ завиÑимоÑÑи Ð¾Ñ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ baseline\n"428 tooltip += "Тогда еÑли Ð½ÐµÑ ÑлÑÑÑений в baseline-ÑпоÑ
аÑ
\n"429 tooltip += "обÑÑение бÑÐ´ÐµÑ Ð¸Ð»Ñи patience-ÑпоÑ
и ÑоÑ
ÑанÑÑÑÑÑ Ð²ÐµÑа лÑÑÑей ÑпоÑ
и в данном набоÑе"430 self.ui.par2_label.setToolTip(tooltip)431 self.ui.par3_label.setText("Min_delta")432 tooltip = "ÐинималÑное знаÑение каÑеÑÑва обÑÑениÑ, пÑинимаемое как ÑлÑÑÑение"433 self.ui.par3_label.setToolTip(tooltip)434 self.ui.par4_label.setText("Patience")435 tooltip = "ÐолиÑеÑÑво ÑпоÑ
без ÑлÑÑÑениÑ, поÑле Ñего обÑÑение оÑÑановиÑÑÑ"436 self.ui.par4_label.setToolTip(tooltip)437 self.ui.par5_label.setText("Verbose")438 self.ui.par5_label.setToolTip("Режим повÑоÑений")439 self.ui.par6_label.setText("Mode")440 tooltip = "Ðдин из {auto, min, max}. ÐÑли min, Ñо обÑÑение оÑÑановиÑÑÑ ÐºÐ¾Ð³Ð´Ð° поÑеÑи пеÑеÑÑанÑÑÑ Ð¿Ð°Ð´Ð°ÑÑ\n"441 tooltip += "ÐÑли max, Ñо обÑÑение оÑÑановиÑÑÑ ÐºÐ¾Ð³Ð´Ð° ÑоÑноÑÑÑ Ð¿ÐµÑеÑÑÐ½ÐµÑ ÑаÑÑи\n"442 tooltip += "ÐÑли auto, напÑавление изменений опÑеделÑеÑÑÑ Ñамо иÑÑ
Ð¾Ð´Ñ Ð¸Ð· знаÑÐµÐ½Ð¸Ñ monitor"443 self.ui.par6_label.setToolTip(tooltip)444 self.ui.par7_label.setText("Baseline")445 self.ui.par7_label.setToolTip("ÐÑновное знаÑение Ð´Ð»Ñ Ð¾ÑÑлеживаемого паÑамеÑÑа каÑеÑÑва обÑÑениÑ")446 self.logic.hide_elements(self.ui, 7, bool_num=1)447 self.ui.par2.setVisible(False)448 self.resize(300, 380)449 self.ui.buttons.move(110, 340)450 451 elif self.ui.list.currentText() == "LambdaCallback" or callback == "LambdaCallback":452 self.ui.par1_label.setText("OnEpochBegin")453 self.ui.par1_label.setToolTip("ÐÐ½Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ ÑÑнкÑиÑ, вÑзÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð² наÑале ÑпоÑ
и\nÐапиÑиÑе ÐµÑ Ð·Ð´ÐµÑÑ")454 self.ui.par2_label.setText("OnEpochEnd")455 self.ui.par2_label.setToolTip("ÐÐ½Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ ÑÑнкÑиÑ, вÑзÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð² конÑе ÑпоÑ
и\nÐапиÑиÑе ÐµÑ Ð·Ð´ÐµÑÑ")456 self.ui.par3_label.setText("OnBatchBegin")457 self.ui.par3_label.setToolTip("ÐÐ½Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ ÑÑнкÑиÑ, вÑзÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð¿ÐµÑед обÑабоÑкой пакеÑ\nÐапиÑиÑе ÐµÑ Ð·Ð´ÐµÑÑа")458 self.ui.par4_label.setText("OnBatchEnd")459 self.ui.par4_label.setToolTip("ÐÐ½Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ ÑÑнкÑиÑ, вÑзÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð² конÑе обÑабоÑки пакеÑа\nÐапиÑиÑе ÐµÑ Ð·Ð´ÐµÑÑ")460 self.ui.par5_label.setText("OnTrainBegin")461 self.ui.par5_label.setToolTip("ÐÐ½Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ ÑÑнкÑиÑ, вÑзÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð² наÑале обÑÑениÑ\nÐапиÑиÑе ÐµÑ Ð·Ð´ÐµÑÑ")462 self.ui.par6_label.setText("OnTrainEnd")463 self.ui.par6_label.setToolTip("ÐÐ½Ð¾Ð½Ð¾Ð¼Ð½Ð°Ñ ÑÑнкÑиÑ, вÑзÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð² конÑе обÑÑениÑ\nÐапиÑиÑе ÐµÑ Ð·Ð´ÐµÑÑ")464 self.logic.hide_elements(self.ui, 6)465 self.resize(300, 340)466 self.ui.buttons.move(110, 300) 467 468 elif self.ui.list.currentText() == "LearningRateSchedular" or callback == "LearningRateSchedular":469 self.ui.par1_label.setText("Schedule")470 self.ui.par1_label.setToolTip("ФÑнкÑиÑ, менÑÑÑÐ°Ñ ÑкоÑоÑÑÑ Ð¾Ð±ÑÑениÑ")471 self.ui.par2_label.setText("Verbose")472 self.ui.par2_label.setToolTip("int. 0: quiet, 1: update messages.")473 self.logic.hide_elements(self.ui, 2, fun_number=True)474 self.ui.par1.setVisible(False)475 self.resize(300, 230)476 self.ui.buttons.move(110, 180)477 self.ui.fun_button.clicked.connect(lambda: self.logic.choice_fun_file(478 obj=self))479 480 elif self.ui.list.currentText() == "ModelCheckpoint" or callback == "ModelCheckpoint":481 self.ui.par1_label.setText("Filepath")482 self.ui.par1_label.setToolTip("ÐÑÑÑ Ðº ÑÐ°Ð¹Ð»Ñ ÑоÑ
ÑанÑемой модели")483 self.ui.par2_label.setText("Save_best_only")484 self.ui.par2_label.setToolTip("СоÑ
ÑанÑÑÑ Ð¸Ð»Ð¸ Ð½ÐµÑ Ð»ÑÑÑÑÑ Ð¼Ð¾Ð´ÐµÐ»Ñ")485 self.ui.par3_label.setText("Save_weights_only")486 self.ui.par3_label.setToolTip("СоÑ
ÑанÑÑÑ Ð¿Ð¾Ð»Ð½ÑÑ Ð¼Ð¾Ð´ÐµÐ»Ñ Ð¸Ð»Ð¸ ÑолÑко веÑа")487 self.ui.par4_label.setText("Monitor")488 self.ui.par4_label.setToolTip("Ðазвание паÑамеÑÑа, по коÑоÑÐ¾Ð¼Ñ Ð¾ÑÑлеживаеÑÑÑ ÐºÐ°ÑеÑÑво обÑÑениÑ")489 self.ui.par5_label.setText("Verbose")490 self.ui.par5_label.setToolTip("Режим повÑоÑений")491 self.ui.par6_label.setText("Mode")492 tooltip = "Ðдин из {auto, min, max}. ÐÑли min, Ñо Ñайл ÑезÑлÑÑаÑа пеÑепиÑеÑÑÑ ÐºÐ¾Ð³Ð´Ð° поÑеÑи пеÑеÑÑанÑÑÑ Ð¿Ð°Ð´Ð°ÑÑ\n"493 tooltip += "ÐÑли max, Ñо Ñайл ÑезÑлÑÑаÑа пеÑепиÑеÑÑÑ ÐºÐ¾Ð³Ð´Ð° ÑоÑноÑÑÑ Ð¿ÐµÑеÑÑÐ½ÐµÑ ÑаÑÑи\n"494 tooltip += "ÐÑли auto, напÑавление изменений опÑеделÑеÑÑÑ Ñамо иÑÑ
Ð¾Ð´Ñ Ð¸Ð· знаÑÐµÐ½Ð¸Ñ monitor"495 self.ui.par6_label.setToolTip(tooltip)496 self.ui.par7_label.setText("Save_freq")497 tooltip = "ÐÑли epoch, Ñо Ð¼Ð¾Ð´ÐµÐ»Ñ ÑоÑ
ÑанÑеÑÑÑ Ð¿Ð¾Ñле каждой ÑпоÑ
и\n"498 tooltip += "ÐÑли ÑиÑло, Ñо Ð¼Ð¾Ð´ÐµÐ»Ñ ÑоÑ
ÑанÑеÑÑÑ Ð¿Ð¾Ñле заданного колиÑеÑÑва ÑпоÑ
"499 self.ui.par7_label.setToolTip(tooltip)500 self.logic.hide_elements(self.ui, 7, bool_num=2)501 self.ui.par2.setVisible(False)502 self.ui.par3.setVisible(False)503 self.resize(300, 380)504 self.ui.buttons.move(110, 340)505 506 elif self.ui.list.currentText() == "ProgbarLogger" or callback == "ProgbarLogger":507 self.ui.par1_label.setText("Count_mode")508 self.ui.par1_label.setToolTip("СледÑÐµÑ ÑÑиÑаÑÑ ÑвиденнÑе пÑимеÑÑ Ð¸Ð»Ð¸ Ñаги\пакеÑÑ")509 self.ui.par2_label.setText("Stateful_metrics")510 tooltip = "СпиÑок меÑÑик, ÑÑо не Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ ÑÑÑедненÑ\n"511 tooltip += "ÐведиÑе ÑпиÑок меÑÑик ÑеÑез запÑÑÑÑ"512 self.ui.par2_label.setToolTip(tooltip)513 self.logic.hide_elements(self.ui, 2)514 self.resize(300, 230)515 self.ui.buttons.move(110, 180)516 517 elif self.ui.list.currentText() == "ReduceLROnPlateau" or callback == "ReduceLROnPlateau":518 self.ui.par1_label.setText("Monitor")519 self.ui.par1_label.setToolTip("ÐолиÑеÑÑво запиÑей Ð´Ð»Ñ Ð¼Ð¾Ð½Ð¸ÑоÑинга")520 self.ui.par2_label.setText("Factor")521 self.ui.par2_label.setToolTip("ФакÑоÑ, на оÑнове коÑоÑого ÑкоÑоÑÑÑ Ð¾Ð±ÑÑÐµÐ½Ð¸Ñ ÑменÑÑаеÑÑÑ")522 self.ui.par3_label.setText("Patience")523 tooltip = "ÐолиÑеÑÑво ÑпоÑ
без ÑлÑÑÑениÑ, поÑле Ñего обÑÑение оÑÑановиÑÑÑ"524 self.ui.par3_label.setToolTip(tooltip)525 self.ui.par4_label.setText("Verbose")526 self.ui.par4_label.setToolTip("Режим повÑоÑений")527 self.ui.par5_label.setText("Mode")528 tooltip = "Ðдин из {auto, min, max}. ÐÑли min, Ñо ÑкоÑоÑÑÑ Ð¾Ð±ÑÑÐµÐ½Ð¸Ñ ÑменÑÑиÑÑÑ ÐºÐ¾Ð³Ð´Ð° поÑеÑи пеÑеÑÑанÑÑÑ Ð¿Ð°Ð´Ð°ÑÑ\n"529 tooltip += "ÐÑли max, Ñо ÑкоÑоÑÑÑ Ð¾Ð±ÑÑÐµÐ½Ð¸Ñ ÑменÑÑиÑÑÑ ÐºÐ¾Ð³Ð´Ð° ÑоÑноÑÑÑ Ð¿ÐµÑеÑÑÐ½ÐµÑ ÑаÑÑи\n"530 tooltip += "ÐÑли auto, напÑавление изменений опÑеделÑеÑÑÑ Ñамо иÑÑ
Ð¾Ð´Ñ Ð¸Ð· знаÑÐµÐ½Ð¸Ñ monitor"531 self.ui.par5_label.setToolTip(tooltip)532 self.ui.par6_label.setText("Min_delta")533 self.ui.par6_label.setToolTip("ÐоÑог Ð´Ð»Ñ Ð¾ÑÑÐ»ÐµÐ¶Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿ÑимÑма модели")534 self.ui.par7_label.setText("Cooldown")535 self.ui.par7_label.setToolTip("ÐолиÑеÑÑво ÑпоÑ
, поÑле коÑоÑÑÑ
ÑкоÑоÑÑÑ Ð¾Ð±ÑÑÐµÐ½Ð¸Ñ Ð±ÑÐ´ÐµÑ ÑнижаÑÑÑÑ")536 self.ui.par8_label.setText("Min_lr")537 self.ui.par8_label.setToolTip("ÐинималÑнÑй допÑÑÑимÑй поÑог ÑкоÑоÑÑи обÑÑениÑ")538 self.logic.hide_elements(self.ui, 8)539 self.resize(300, 420)540 self.ui.buttons.move(110, 380)541 542 elif self.ui.list.currentText() == "RemoteMonitor" or callback == "RemoteMonitor":543 self.ui.par1_label.setText("Root")544 self.ui.par1_label.setToolTip("СÑÑлка на ÑдаленнÑй ÑеÑвеÑ")545 self.ui.par2_label.setText("Send_as_JSON")546 self.ui.par2_label.setToolTip("ÐÑпÑавлÑÑÑ Ð¸Ð»Ð¸ Ð½ÐµÑ Ð·Ð°Ð¿ÑÐ¾Ñ ÐºÐ°Ðº application/json")547 self.ui.par3_label.setText("Path")548 tooltip = "ÐÑÑÑ Ð¾ÑноÑиÑелÑно ÑеÑвеÑа, кÑда бÑдÑÑ Ð¾ÑпÑавлÑÑÑÑÑ ÑайлÑ"549 self.ui.par3_label.setToolTip(tooltip)550 self.ui.par4_label.setText("Field")551 self.ui.par4_label.setToolTip("JSON-поле, под коÑоÑÑм даннÑе бÑдÑÑ Ñ
ÑаниÑÑÑ")552 self.ui.par5_label.setText("Headers")553 self.ui.par5_label.setToolTip("ÐпÑионалÑно наÑÑÑаиваемÑе HTTP-заголовки\nÐведиÑе ÑловаÑÑ Python ÑекÑÑом")554 self.logic.hide_elements(self.ui, 5, bool_num=1)555 self.ui.par2.setVisible(False)556 self.resize(300, 300)557 self.ui.buttons.move(110, 260)558 559 elif self.ui.list.currentText() == "TensorBoard" or callback == "TensorBoard":560 self.ui.par1_label.setText("Log_dir")561 self.ui.par1_label.setToolTip("ÐÑÑÑ Ðº папке, кÑда бÑдÑÑ ÑоÑ
ÑанÑÑÑÑÑ Ð»Ð¾Ð³Ð¸")562 self.ui.par2_label.setText("Write_graph")563 self.ui.par2_label.setToolTip("ÐизÑализиÑоваÑÑ Ð»Ð¸ гÑаÑики на TensorBoard")564 self.ui.par3_label.setText("Write_images")565 self.ui.par3_label.setToolTip("ÐизÑализиÑоваÑÑ Ð»Ð¸ изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð²ÐµÑов в TensorBoard")566 self.ui.par4_label.setText("Write_steps\n_per_epoch")567 self.ui.par4_label.setToolTip("ÐапиÑÑваÑÑ Ð»Ð¸ в логи знаÑÐµÐ½Ð¸Ñ Ð½Ð° каждом Ñаге")568 self.ui.par5_label.setText("Histogram_freg")569 self.ui.par5_label.setToolTip("ЧаÑÑоÑа, Ñ ÐºÐ¾ÑоÑой вÑÑиÑлÑÑÑÑÑ Ð²ÐµÑа Ð´Ð»Ñ Ð³Ð¸ÑÑогÑаммÑ")570 self.ui.par6_label.setText("Update_freq")571 tooltip = "ÐÑли batch\epoch, Ñо поÑеÑи и меÑÑики запиÑÑваÑÑÑÑ Ð¿Ð¾Ñле каждой ÑпоÑ
и\n"572 tooltip += "ÐÑли ÑиÑло, Ñо поÑле заданного ÑиÑла обÑабоÑаннÑÑ
пакеÑов"573 self.ui.par6_label.setToolTip(tooltip)574 self.ui.par7_label.setText("Profile_batch")575 self.ui.par7_label.setToolTip("ÐÑоÑÐ¸Ð»Ñ Ð¿Ð°ÐºÐµÑов Ð´Ð»Ñ ÑаÑÑеÑа Ñ
аÑакÑеÑиÑÑик")576 self.ui.par8_label.setText("Embeddings_freqs")577 self.ui.par8_label.setToolTip("ЧаÑÑоÑа, Ñ ÐºÐ¾ÑоÑой embeddings-Ñлои бÑдÑÑ Ð²Ð¸Ð·ÑализиÑоваÑÑÑÑ")578 self.ui.par9_label.setText("Embeddings_metadata")579 tooltip = "СловаÑÑ, где ÑÐºÐ°Ð·Ð°Ð½Ñ Ð¸Ð¼ÐµÐ½Ð° embeddings-Ñлоев и пÑÑÑ Ðº ÑÐ°Ð¹Ð»Ñ Ð´Ð»Ñ ÑоÑ
ÑÐ°Ð½ÐµÐ½Ð¸Ñ Ð¼ÐµÑаданнÑÑ
ÑлоÑ\n"580 tooltip += "ÐведиÑе ÑловаÑÑ Python ÑекÑÑом"581 self.ui.par9_label.setToolTip(tooltip)582 self.logic.hide_elements(self.ui, 9, bool_num=3)583 self.ui.par2.setVisible(False)584 self.ui.par3.setVisible(False)585 self.ui.par4.setVisible(False)586 self.resize(300, 460)587 self.ui.buttons.move(110, 420)588589 elif self.ui.list.currentText() == "TerminateOnNaN" or callback == "TerminateOnNaN":590 self.logic.hide_elements(self.ui, 1)591 self.ui.par1.setVisible(False)592 self.ui.par1_label.setVisible(False)593 self.resize(300, 230)594 self.ui.buttons.move(110, 180)595 596 def choice_nets(self, net=None):597 self.ui.par1_label.setText("Weights")598 self.ui.par1_label.setToolTip("ÐÑÐ±Ð¾Ñ Ð¸ÑполÑзÑемÑÑ
веÑов модели")599 self.ui.par2_label.setText("Include_top")600 self.ui.par2_label.setToolTip("ÐклÑÑаÑÑ Ð¸Ð»Ð¸ Ð½ÐµÑ Ð¿Ð¾Ð»Ð½Ð¾ÑвÑзнÑй клаÑÑиÑикаÑоÑ")601 self.ui.par3_label.setText("Input_tensor")602 self.ui.par3_label.setToolTip("ÐÑ
одной ÑÐµÐ½Ð·Ð¾Ñ Ð¼Ð¾Ð´ÐµÐ»Ð¸")603 self.ui.par4_label.setText("Input_shape")604 self.ui.par4_label.setToolTip("ФоÑма вÑ
однÑÑ
даннÑÑ
")605 self.ui.par5_label.setText("Pooling")606 tooltip = "СпоÑоб извлеÑÐµÐ½Ð¸Ñ Ð¿Ñизнаков, когда include_top ÑÑÑановлен в false"607 self.ui.par5_label.setToolTip(tooltip)608 self.ui.par6_label.setText("Classes")609 self.ui.par6_label.setToolTip("ЧиÑло клаÑÑов модели")610 self.ui.par7_label.setText("Activation")611 self.ui.par7_label.setToolTip("ФÑнкÑÐ¸Ñ Ð°ÐºÑиваÑии поÑледнего ÑÐ»Ð¾Ñ ÐºÐ»Ð°ÑÑиÑикаÑоÑа")612 if self.ui.list.currentText() == "Xception" or net == "Xception" or (613 self.ui.list.currentText() == "InceptionResNetV2" or net == "InceptionResNetV2") or (614 self.ui.list.currentText() == "InceptionV3" or net == "InceptionV3") or (615 self.ui.list.currentText() == "ResNet50" or net == "ResNet50") or (616 self.ui.list.currentText() == "ResNet101" or net == "ResNet101") or (617 self.ui.list.currentText() == "ResNet152" or net == "ResNet152") or (618 self.ui.list.currentText() == "ResNet50V2" or net == "ResNet50V2") or (619 self.ui.list.currentText() == "VGG16" or net == "VGG16") or (620 self.ui.list.currentText() == "VGG19" or net == "VGG19"):621 self.logic.hide_elements(self.ui, 7, bool_num=1)622 self.resize(300, 380)623 self.ui.buttons.move(110, 340)624 625 elif self.ui.list.currentText() == "MobileNet" or net == "MobileNet":626 self.ui.par8_label.setText("Alpha")627 self.ui.par8_label.setToolTip("ÐаÑамеÑÑ ÐºÐ¾Ð½ÑÑÐ¾Ð»Ñ ÑиÑÐ¸Ð½Ñ ÑлоÑв модели")628 self.ui.par9_label.setText("Depth_multiplier")629 self.ui.par9_label.setToolTip("ÐлÑбина ÑвÑÑÑки по глÑбине")630 self.ui.par10_label.setText("Dropout")631 self.ui.par10_label.setToolTip("СÑÐµÐ¿ÐµÐ½Ñ Ð¿ÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑазмÑканиÑ")632 self.logic.hide_elements(self.ui, 10, bool_num=1)633 self.resize(300, 500)634 self.ui.buttons.move(110, 460)635 636 elif self.ui.list.currentText() == "MobileNetV2" or net == "MobileNetV2":637 self.ui.par8_label.setText("Alpha")638 self.ui.par8_label.setToolTip("ÐаÑамеÑÑ ÐºÐ¾Ð½ÑÑÐ¾Ð»Ñ ÑиÑÐ¸Ð½Ñ ÑлоÑв модели")639 self.logic.hide_elements(self.ui, 8, bool_num=1)640 self.resize(300, 420)641 self.ui.buttons.move(110, 380)642 643 elif self.ui.list.currentText() == "DenseNet121" or net == "DenseNet121" or (644 self.ui.list.currentText() == "DenseNet169" or net == "DenseNet169") or (645 self.ui.list.currentText() == "DenseNet201" or net == "DenseNet201"):646 self.logic.hide_elements(self.ui, 5, bool_num=1)647 self.resize(300, 300)648 self.ui.buttons.move(110, 260)649 self.ui.par2.setVisible(False)650 651 def choice_check_metric(self, check_metric=None): 652 self.ui.par1_label.setText("Sample weight")653 self.ui.par1_label.setToolTip("ÐеÑа пÑимеÑов в ÑоÑме маÑÑива")654 if self.ui.list.currentText() == "F1" or check_metric == "F1" or (655 self.ui.list.currentText() == "Precision" or check_metric == "Precision") or (656 self.ui.list.currentText() == "Recall" or check_metric == "Recall") or (657 self.ui.list.currentText() == "Jaccard" or check_metric == "Jaccard"):658 self.ui.par2_label.setText("Labels")659 self.ui.par2_label.setToolTip("ÐÐ°Ð±Ð¾Ñ Ð¼ÐµÑок, еÑли average != 'binary', или иÑ
поÑÑдок пÑи average None")660 self.ui.par3_label.setText("Pos_label")661 self.ui.par4_label.setToolTip("ÐÑÑеÑнÑй клаÑÑ, еÑли average 'binary', инаÑе паÑамеÑÑ Ð¸Ð³Ð½Ð¾ÑиÑÑеÑÑÑ")662 self.ui.par5_label.setText("Average")663 tooltip = "ÐÑли None, Ñо оÑенки ÑÑиÑаÑÑÑÑ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ клаÑÑа\n"664 tooltip += "ÐнаÑе паÑамеÑÑ Ð¾Ð¿ÑеделÑÐµÑ Ñип ÑÑÑÐµÐ´Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½ÑÑ
"665 self.ui.par4_label.setToolTip(tooltip)666 self.ui.par5_label.setText("Zero_division")667 tooltip = "ÐÐ°Ð±Ð¾Ñ Ð·Ð½Ð°Ñений, возвÑаÑаемÑÑ
когда вÑе пÑедÑÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¸ меÑки негаÑивнÑе\n"668 tooltip += "(ÐÑÑÑ Ð´ÐµÐ»ÐµÐ½Ð¸Ðµ на 0)"669 self.ui.par5_label.setToolTip(tooltip)670 self.logic.hide_elements(self.ui, 5)671 self.resize(300, 300)672 self.ui.buttons.move(110, 260)673 674 elif self.ui.list.currentText() == "Accuracy" or check_metric == "Accuracy":675 self.ui.par2_label.setText("Normalize")676 tooltip = "ÐозвÑаÑаÑÑ Ð»Ð¸ ÑÑнкÑÐ¸Ñ Ð¾Ñ ÑиÑла или ÑиÑло пÑавилÑно клаÑÑиÑиÑиÑованнÑÑ
меÑок"677 self.ui.par2_label.setToolTip(tooltip)678 self.logic.hide_elements(self.ui, 2)679 self.ui.par2.setVisible(False)680 self.ui.bool_check1.setVisible(True)681 self.resize(300, 230)682 self.ui.buttons.move(110, 180)683 684 elif self.ui.list.currentText() == "Balanced_accuracy" or check_metric == "Balanced_accuracy":685 self.ui.par2_label.setText("Adjusted")686 tooltip = "ÐаÑÑÑавиваÑÑ Ð¸Ð»Ð¸ Ð½ÐµÑ ÑезÑлÑÑÐ°Ñ Ð½Ð° Ñандомное пÑедÑÑавление как 0 и ÑовеÑÑенное как 1"687 self.ui.par2_label.setToolTip(tooltip)688 self.logic.hide_elements(self.ui, 2)689 self.ui.par2.setVisible(False)690 self.ui.bool_check1.setVisible(True)691 self.resize(300, 230)692 self.ui.buttons.move(110, 180)693 694 elif self.ui.list.currentText() == "Top_K_accuracy" or check_metric == "Top_K_accuracy":695 self.ui.par2_label.setText("Normalize")696 tooltip = "ÐозвÑаÑаÑÑ Ð»Ð¸ ÑÑнкÑÐ¸Ñ Ð¾Ñ ÑиÑла или ÑиÑло пÑавилÑно клаÑÑиÑиÑиÑованнÑÑ
меÑок"697 self.ui.par2_label.setToolTip(tooltip)698 self.ui.par3_label.setText("K")699 self.ui.par3_label.setToolTip("ЧиÑло иÑÑ
одов Ð´Ð»Ñ Ð½Ð°Ñ
Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ ÐºÐ¾ÑÑекÑной меÑки")700 self.ui.par4_label.setText("Labels")701 self.ui.par4_label.setToolTip("СпиÑок меÑок ÑÑо опÑеделÑÑÑ ÐºÐ»Ð°ÑÑÑ Ð¿ÑедÑказаний")702 self.logic.hide_elements(self.ui, 4)703 self.ui.par2.setVisible(False)704 self.ui.bool_check1.setVisible(True)705 self.resize(300, 260)706 self.ui.buttons.move(110, 220)707 708 elif self.ui.list.currentText() == "Average_precision" or check_metric == "Average_precision":709 self.ui.par2_label.setText("Pos_label")710 self.ui.par2_label.setToolTip("ÐеÑка положиÑелÑного клаÑÑа Ð´Ð»Ñ Ð±Ð¸Ð½Ð°Ñной клаÑÑиÑикаÑии")711 self.ui.par3_label.setText("Average")712 tooltip = "ÐÑли None, Ñо оÑенки ÑÑиÑаÑÑÑÑ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ клаÑÑа\n"713 tooltip += "ÐнаÑе паÑамеÑÑ Ð¾Ð¿ÑеделÑÐµÑ Ñип ÑÑÑÐµÐ´Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½ÑÑ
"714 self.ui.par3_label.setToolTip(tooltip)715 self.logic.hide_elements(self.ui, 3)716 self.resize(300, 230)717 self.ui.buttons.move(110, 180)718 719 elif self.ui.list.currentText() == "Neg_brief" or check_metric == "Neg_brief":720 self.ui.par2_label.setText("Pos_label")721 self.ui.par2_label.setToolTip("ÐеÑка положиÑелÑного клаÑÑа Ð´Ð»Ñ Ð±Ð¸Ð½Ð°Ñной клаÑÑиÑикаÑии")722 self.logic.hide_elements(self.ui, 2)723 self.resize(300, 230)724 self.ui.buttons.move(110, 180)725726 elif self.ui.list.currentText() == "Neg_log" or check_metric == "Neg_log":727 self.ui.par2_label.setText("Normalize")728 self.ui.par2_label.setToolTip("ÐозвÑаÑаÑÑ Ð»Ð¸ ÑÑедние поÑеÑи на ÑкземплÑÑ Ð¸Ð»Ð¸ ÑÑÐ¼Ð¼Ñ Ð¿Ð¾ÑеÑÑ")729 self.ui.par3_label.setText("Eps")730 tooltip = "ÐоÑеÑи опÑеделеÑннÑе Ð´Ð»Ñ Ñ=0 и Ñ=1, Ñак ÑÑо веÑоÑÑноÑÑи ÑÑÑемÑÑÑÑ Ðº макÑимÑмÑ"731 self.ui.par3_label.setToolTip(tooltip)732 self.ui.par4_label.setText("Labels")733 self.ui.par4_label.setToolTip("СпиÑок меÑок ÑÑо опÑеделÑÑÑ ÐºÐ»Ð°ÑÑÑ Ð¿ÑедÑказаний")734 self.logic.hide_elements(self.ui, 4)735 self.ui.par2.setVisible(False)736 self.ui.bool_check1.setVisible(True)737 self.resize(300, 260)738 self.ui.buttons.move(110, 220)739740 elif self.ui.list.currentText() == "ROC_AUC" or check_metric == "ROC_AUC":741 self.ui.par2_label.setText("Average")742 tooltip = "ÐÑли None, Ñо оÑенки ÑÑиÑаÑÑÑÑ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ клаÑÑа\n"743 tooltip += "ÐнаÑе паÑамеÑÑ Ð¾Ð¿ÑеделÑÐµÑ Ñип ÑÑÑÐµÐ´Ð½ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½ÑÑ
"744 self.ui.par2_label.setToolTip(tooltip)745 self.ui.par3_label.setText("Max_fpr")746 tooltip = "ÐпÑеделÑÐµÑ Ð²ÐµÐ»Ð¸ÑÐ¸Ð½Ñ Ð²Ð¾Ð·Ð²ÑаÑаемого ÑÑандаÑÑизиÑованного ÑаÑÑиÑного AUC в диапазоне Ð¾Ñ 0 до max_fpr"747 self.ui.par3_label.setToolTip(tooltip)748 self.ui.par4_label.setText("Multiclass")749 self.ui.par4_label.setToolTip("Тип меÑÑики Ð´Ð»Ñ Ð¼Ð½Ð¾Ð³Ð¾ÐºÐ»Ð°ÑÑовой клаÑÑиÑикаÑии")750 self.ui.par5_label.setText("Labels")751 self.ui.par5_label.setToolTip("СпиÑок меÑок ÑÑо опÑеделÑÑÑ ÐºÐ»Ð°ÑÑÑ Ð¿ÑедÑказаний")752 self.logic.hide_elements(self.ui, 5)753 self.resize(300, 300)754 self.ui.buttons.move(110, 260)755 756 def between_wins(self):757 #Ð½Ð°Ð±Ð¾Ñ ÑÑиÑаннÑÑ
знаÑений паÑамеÑÑов758 settings = (self.ui.par1.text(), self.ui.par2.text(),759 self.ui.par3.text(), self.ui.par4.text(),760 self.ui.par5.text(), self.ui.par6.text(),761 self.ui.par7.text(), self.ui.par8.text(), self.ui.par9.text())762763 #Ð½Ð°Ð±Ð¾Ñ Ð²ÑеÑ
логиÑеÑкиÑ
паÑамеÑÑов764 bools = (self.ui.bool_check1.isChecked(), self.ui.bool_check2.isChecked(),765 self.ui.bool_check3.isChecked())766
...
thumbnail.py
Source:thumbnail.py
...45 final_page_height = page_height46 else:47 break48 if isinstance(driver, webdriver.Ie):49 self.hide_elements(driver, elements)50 required_width = driver.execute_script('return document.body.parentNode.scrollWidth')51 driver.set_window_size(required_width, final_page_height)52 driver.save_screenshot(image_name)53 driver.set_window_size(original_size['width'], original_size['height'])54 return image_name55 else:56 driver.set_window_size(600, 600)57 total_width = driver.execute_script("return document.body.offsetWidth")58 total_height = driver.execute_script("return document.body.parentNode.scrollHeight")59 viewport_width = driver.execute_script("return document.body.clientWidth")60 viewport_height = driver.execute_script("return window.innerHeight")61 print(total_width, total_height, viewport_width, viewport_height)62 driver.execute_script("window.scrollTo(0, 0)")63 time.sleep(2)64 rectangles = []65 self.hide_elements(driver, elements)66 i = 067 while i < total_height:68 ii = 069 top_height = i + viewport_height70 if top_height > total_height:71 top_height = total_height72 while ii < total_width:73 top_width = ii + viewport_width74 if top_width > total_width:75 top_width = total_width76 rectangles.append((ii, i, top_width, top_height))77 ii = ii + viewport_width78 i = i + viewport_height79 stitched_image = Image.new('RGB', (total_width, total_height))80 previous = None81 part = 082 for rectangle in rectangles:83 if not previous is None:84 driver.execute_script("window.scrollTo({0}, {1})".format(rectangle[0], rectangle[1]))85 time.sleep(3)86 file_name = "part_{0}.png".format(part)87 driver.get_screenshot_as_file(file_name)88 screenshot = Image.open(file_name)89 if rectangle[1] + viewport_height > total_height:90 offset = (rectangle[0], total_height - viewport_height)91 else:92 offset = (rectangle[0], rectangle[1])93 stitched_image.paste(screenshot, offset)94 del screenshot95 os.remove(file_name)96 part = part + 197 previous = rectangle98 save_path = os.path.abspath(os.path.join(save_path, image_name))99 stitched_image.save(save_path)100 return save_path101 def get_element(self, driver: WebDriver, element: WebElement, save_location: str, to_hide: list = None) -> str:102 """103 Usage:104 Capture Element screenshot as a image105 Args:106 driver: Web driver instance107 element : The element on web page to be captured108 save_location : Path where to save image109 Returns:110 img_url(str) : The path of image111 Raises:112 N/A113 """114 image = self.full_Screenshot(driver, save_path=save_location, image_name='clipping_shot.png', elements=to_hide)115 location = element.location116 size = element.size117 x = location['x']118 y = location['y']119 w = size['width']120 h = size['height']121 width = x + w122 height = y + h123 print(width, height)124 image_object = Image.open(image)125 image_object = image_object.crop((int(x), int(y), int(width), int(height)))126 uid = str(uuid.uuid4())127 img_url = os.path.abspath(os.path.join(save_location, f"{uid}.png"))128 image_object.save(img_url)129 return img_url130 @staticmethod131 def hide_elements(driver: WebDriver, elements: list) -> None:132 """133 Usage:134 Hide elements from web page135 Args:136 driver : The path of chromedriver137 elements : The element on web page to be hide138 Returns:139 N/A140 Raises:141 N/A142 """143 if elements is not None:144 try:145 for e in elements:...
Ray.py
Source:Ray.py
1from selenium import webdriver2from selenium.webdriver.common.by import By3from urllib.parse import urlencode4import base645driver = webdriver.Chrome("C:\webdrivers\chromedriver.exe")6code = b'x = "hello world"\nprint(x)'7code = base64.b64encode(code)8params = {9 'colors': 'sunset',10 'background': 'true',11 'darkMode': 'true',12 'padding': '16',13 'title': 'hello',14 'code': code,15 'language': 'python',16}17url = f'https://ray.so/?{urlencode(params)}'18driver.get(url)19hide_elements = driver.find_elements(By.XPATH, '//*[@id="frame"]/div[@data-hide-when-exporting]')20for element in hide_elements:21 driver.execute_script("arguments[0].style.display = 'none';", element)22image = driver.find_element(By.ID, 'frame').screenshot('./ray.so.image.png')...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!