Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shah, Karan <[email protected]>
  • Loading branch information
MasterSkepticista committed Dec 11, 2024
1 parent f5ebd1d commit af0c40f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openfl/callbacks/callback_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Copyright 2020-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from typing import List

from openfl.callbacks.callback import Callback
from openfl.callbacks.memory_profiler import MemoryProfiler

Expand All @@ -22,7 +20,7 @@ class CallbackList(Callback):

def __init__(
self,
callbacks: List[Callback],
callbacks: list,
add_memory_profiler=False,
tensor_db=None,
**params,
Expand Down Expand Up @@ -76,6 +74,8 @@ def on_experiment_end(self, logs=None):

def _flatten(l):
"""Flatten a possibly-nested tree of lists."""
if not isinstance(l, (list, tuple)):
return [l]
for elem in l:
if isinstance(elem, list):
yield from _flatten(elem)
Expand Down

0 comments on commit af0c40f

Please sign in to comment.