Skip to content

Commit 3dcb1c0

Browse files
committed
lint
1 parent e4985b2 commit 3dcb1c0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

autointent/_pipeline/_pipeline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def fit(self, dataset: Dataset, force_multilabel: bool = False) -> Context:
135135
predictions = self.predict(context.data_handler.test_utterances())
136136
for metric_name, metric in PREDICTION_METRICS_MULTILABEL.items():
137137
context.optimization_info.pipeline_metrics[metric_name] = metric(
138-
context.data_handler.test_labels(), predictions,
138+
context.data_handler.test_labels(),
139+
predictions,
139140
)
140141

141142
return context

autointent/metrics/scoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def scoring_neg_coverage(labels: LABELS_VALUE_TYPE, scores: SCORES_VALUE_TYPE) -
247247

248248
def scoring_neg_ranking_loss(labels: LABELS_VALUE_TYPE, scores: SCORES_VALUE_TYPE) -> float:
249249
"""
250-
supports multilabel.
250+
Supports multilabel.
251251
252252
Compute the average number of label pairs that are incorrectly ordered given y_score
253253
weighted by the size of the label set and the number of labels not in the label set.

tests/context/datahandler/test_data_handler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_sample_validation(label):
129129
"validation_1": mock_split(),
130130
"test": mock_split(),
131131
},
132-
]
132+
],
133133
)
134134
def test_dataset_initialization(mapping):
135135
dataset = Dataset.from_dict(mapping)
@@ -151,8 +151,8 @@ def test_dataset_initialization(mapping):
151151
{"train": mock_split(), "validation": mock_split(), "validation_0": mock_split()},
152152
{"train": mock_split(), "validation": mock_split(), "validation_1": mock_split()},
153153
{"train": mock_split(), "validation": mock_split(), "validation_0": mock_split(), "validation_1": mock_split()},
154-
{"train": mock_split(), "oos": mock_split()}
155-
]
154+
{"train": mock_split(), "oos": mock_split()},
155+
],
156156
)
157157
def test_dataset_validation(mapping):
158158
with pytest.raises(ValueError):
@@ -169,7 +169,7 @@ def test_dataset_validation(mapping):
169169
"test": [{"utterance": "Hello!", "label": 0}],
170170
},
171171
{"train": [{"utterance": "Hello!"}]},
172-
]
172+
],
173173
)
174174
def test_intents_validation(mapping):
175175
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)