Skip to content

Commit de8e318

Browse files
committed
Fix CI lint and precomputed predict path
1 parent e5a9239 commit de8e318

4 files changed

Lines changed: 93 additions & 137 deletions

File tree

s2apler/arrow_io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ def _prepare_output_dir(output_dir: Path, *, overwrite: bool) -> None:
398398
existing_bundle_files = [file_name for file_name in bundle_file_names if (output_dir / file_name).exists()]
399399
if existing_bundle_files and not overwrite:
400400
raise FileExistsError(
401-
f"Arrow bundle files already exist at {output_dir}: {existing_bundle_files}; pass overwrite=True to replace them"
401+
"Arrow bundle files already exist at "
402+
f"{output_dir}: {existing_bundle_files}; pass overwrite=True to replace them"
402403
)
403404
if overwrite:
404405
for file_name in bundle_file_names:

s2apler/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,9 @@ def fixed_pairs(
827827
-------
828828
train/val/test pairs, where each pair is (paper_id_1, paper_id_2, label)
829829
"""
830-
assert self.train_pairs is not None and self.test_pairs is not None, (
831-
"You need to pass in train and test pairs to use this function"
832-
)
830+
assert (
831+
self.train_pairs is not None and self.test_pairs is not None
832+
), "You need to pass in train and test pairs to use this function"
833833
self.train_pairs.loc[:, "label"] = self.train_pairs["label"].map(
834834
{"NO": 0, "YES": 1, "0": 0, 0: 0, "1": 1, 1: 1}
835835
)

0 commit comments

Comments
 (0)