Skip to content

Commit b6a2ce2

Browse files
authored
fix: relax check on dataloader (#106)
* fix: relax check on dataloader * Update CHANGELOG.rst
1 parent d05af70 commit b6a2ce2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Changelog
1818
Ver 0.1.*
1919
---------
2020

21+
* |Fix| Relax check on input dataloader | `@xuyxu <https://github.com/xuyxu>`__
2122
* |Feature| |API| Support arbitrary training criteria for all ensembles except Gradient Boosting | `@by256 <https://github.com/by256>`__ and `@xuyxu <https://github.com/xuyxu>`__
2223
* |Fix| Fix missing functionality of ``save_model`` for :meth:`fit` of Soft Gradient Boosting | `@xuyxu <https://github.com/xuyxu>`__
2324
* |Feature| |API| Add :class:`SoftGradientBoostingClassifier` and :class:`SoftGradientBoostingRegressor` | `@xuyxu <https://github.com/xuyxu>`__

torchensemble/utils/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def load(model, save_dir="./", logger=None):
7575

7676
def split_data_target(element, device, logger=None):
7777
"""Split elements in dataloader according to pre-defined rules."""
78-
if not isinstance(element, list):
78+
if not (isinstance(element, list) or isinstance(element, tuple)):
7979
msg = (
8080
"Invalid dataloader, please check if the input dataloder is valid."
8181
)

0 commit comments

Comments
 (0)