Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions chebai/preprocessing/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ def _load_data_from_file(self, path: str) -> List[Dict[str, Any]]:
val
for val in data
if val["features"] is not None
and self.n_token_limit is None
or len(val["features"]) <= self.n_token_limit
and (
self.n_token_limit is None or len(val["features"]) <= self.n_token_limit
)
]

return data
Expand Down