diff --git a/python/ray/util/sgd/torch/training_operator.py b/python/ray/util/sgd/torch/training_operator.py index 873767dc1..8d275fe9c 100644 --- a/python/ray/util/sgd/torch/training_operator.py +++ b/python/ray/util/sgd/torch/training_operator.py @@ -22,6 +22,7 @@ try: except ImportError: pass + def _is_multiple(component): """Checks if a component (optimizer, model, etc) is not singular.""" return isinstance(component, collections.Iterable) and len(component) > 1