Skip to content

Commit 767a112

Browse files
committed
fix order of operations during none filtering in data preprocessing
1 parent 1f99725 commit 767a112

File tree

1 file changed

+3
-2
lines changed
  • chebai/preprocessing/datasets

1 file changed

+3
-2
lines changed

chebai/preprocessing/datasets/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,9 @@ def _load_data_from_file(self, path: str) -> List[Dict[str, Any]]:
335335
val
336336
for val in data
337337
if val["features"] is not None
338-
and self.n_token_limit is None
339-
or len(val["features"]) <= self.n_token_limit
338+
and (
339+
self.n_token_limit is None or len(val["features"]) <= self.n_token_limit
340+
)
340341
]
341342

342343
return data

0 commit comments

Comments
 (0)