We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd03529 commit 161d260Copy full SHA for 161d260
1 file changed
libmultilabel/nn/data_utils.py
@@ -222,12 +222,8 @@ def load_datasets(
222
Returns:
223
dict: A dictionary of datasets.
224
"""
225
- if isinstance(training_data, str) or isinstance(test_data, str):
226
- assert training_data or test_data, "At least one of `training_data` and `test_data` must be specified."
227
- elif isinstance(training_data, pd.DataFrame) or isinstance(test_data, pd.DataFrame):
228
- assert (
229
- not training_data.empty or not test_data.empty
230
- ), "At least one of `training_data` and `test_data` must be specified."
+ if training_data is None and test_data is None:
+ raise ValueError("At least one of `training_data` and `test_data` must be specified.")
231
232
datasets = {}
233
if training_data is not None:
0 commit comments