File tree Expand file tree Collapse file tree 4 files changed +26
-14
lines changed Expand file tree Collapse file tree 4 files changed +26
-14
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ def define_model(trial):
97
97
98
98
99
99
def objective (trial ):
100
-
101
100
# Generate the model.
102
101
model = define_model (trial ).to (DEVICE )
103
102
@@ -117,7 +116,6 @@ def objective(trial):
117
116
118
117
# Training of the model.
119
118
for epoch in range (EPOCHS ):
120
-
121
119
train (optimizer , model , train_loader )
122
120
val_accuracy = validate (model , valid_loader )
123
121
trial .report (val_accuracy , epoch )
Original file line number Diff line number Diff line change 14
14
15
15
16
16
if __name__ == "__main__" :
17
-
18
17
# Dataset parameters.
19
18
num_classes = 2 # linear sequence or not.
20
19
seq_max_len = 20 # Maximum sequence length.
21
20
seq_min_len = 5 # Minimum sequence length (before padding).
22
- masking_val = (
23
- - 1
24
- ) # -1 will represents the mask and be used to pad sequences to a common max length.
21
+ masking_val = - 1 # -1 will represents the mask and be used to pad sequences to a common max length.
25
22
max_value = 10000 # Maximum int value.
26
23
27
24
# Training Parameters
Original file line number Diff line number Diff line change @@ -51,3 +51,28 @@ priority = "supplemental"
51
51
[[tool .poetry .source ]]
52
52
name = " PyPI"
53
53
priority = " primary"
54
+
55
+
56
+ [tool .ruff ]
57
+ lint.extend-select = [" C901" ]
58
+ lint.mccabe.max-complexity = 11
59
+
60
+ [tool .pytest .ini_options ]
61
+ addopts = " -p no:warnings --cov=simvue"
62
+ testpaths = [
63
+ " tests"
64
+ ]
65
+ markers = [
66
+ " client: tests of Simvue client" ,
67
+ " converters: tests for Simvue object converters" ,
68
+ " dispatch: test data dispatcher" ,
69
+ " run: test the simvue Run class" ,
70
+ " utilities: test simvue utilities module" ,
71
+ " scenario: test scenarios"
72
+ ]
73
+
74
+ [tool .interrogate ]
75
+ ignore-init-method = true
76
+ fail-under = 95
77
+ verbose = 1
78
+ exclude = [" docs" , " tests" , " multiparser/typing.py" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments