Skip to content

Commit a74e5dd

Browse files
committed
fix codestyle
1 parent e24bde4 commit a74e5dd

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

autointent/context/_context.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ def configure_data(self, config: DataConfig) -> None:
8181
:param config: Configuration for the data handling process.
8282
"""
8383
self.data_handler = DataHandler(
84-
dataset=load_dataset(config.train_path),
85-
random_seed=self.seed,
86-
scheme=config.scheme
84+
dataset=load_dataset(config.train_path), random_seed=self.seed, scheme=config.scheme
8785
)
8886

8987
def set_dataset(self, dataset: Dataset, scheme: Literal["ho", "cv"]) -> None:

autointent/metrics/scoring.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,13 @@ def __call__(self, labels: LABELS_VALUE_TYPE, scores: SCORES_VALUE_TYPE) -> floa
3030
...
3131

3232

33-
34-
3533
def ignore_oos(func: ScoringMetricFn) -> ScoringMetricFn:
3634
"""Ignore OOS in metrics calculation (decorator)."""
3735

3836
@wraps(func)
3937
def wrapper(labels: list[Any | None], scores: list[Any]) -> float:
4038
labels_filtered = [lab for lab in labels if lab is not None]
41-
scores_filtered = [
42-
score for score, lab in zip(scores, labels, strict=True) if lab is not None
43-
]
39+
scores_filtered = [score for score, lab in zip(scores, labels, strict=True) if lab is not None]
4440
return func(labels_filtered, scores_filtered)
4541

4642
return wrapper

autointent/modules/abc/_scoring.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def fit(
2727
self,
2828
utterances: list[str],
2929
labels: ListOfLabels,
30-
) -> None:
31-
...
30+
) -> None: ...
3231

3332
def score_ho(self, context: Context, metrics: list[str]) -> dict[str, float]:
3433
train_utterances, train_labels = self.get_train_data(context)

0 commit comments

Comments
 (0)