Skip to content

Commit

Permalink
fix: relax check on dataloader (#106)
Browse files Browse the repository at this point in the history
* fix: relax check on dataloader

* Update CHANGELOG.rst
  • Loading branch information
xuyxu authored Jan 16, 2022
1 parent d05af70 commit b6a2ce2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Changelog
Ver 0.1.*
---------

* |Fix| Relax check on input dataloader | `@xuyxu <https://github.com/xuyxu>`__
* |Feature| |API| Support arbitrary training criteria for all ensembles except Gradient Boosting | `@by256 <https://github.com/by256>`__ and `@xuyxu <https://github.com/xuyxu>`__
* |Fix| Fix missing functionality of ``save_model`` for :meth:`fit` of Soft Gradient Boosting | `@xuyxu <https://github.com/xuyxu>`__
* |Feature| |API| Add :class:`SoftGradientBoostingClassifier` and :class:`SoftGradientBoostingRegressor` | `@xuyxu <https://github.com/xuyxu>`__
Expand Down
2 changes: 1 addition & 1 deletion torchensemble/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def load(model, save_dir="./", logger=None):

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

0 comments on commit b6a2ce2

Please sign in to comment.