Skip to content

Commit

Permalink
Handle empty tasks key
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Oct 17, 2024
1 parent 063c713 commit 4308f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibllib/io/session_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def merge_params(a, b, copy=False):
if k == 'tasks':
# For tasks, keep order and skip duplicates
# Assert tasks is a list of single value dicts
assert set(map(len, prev)) == {1} and set(map(len, b[k])) == {1}
assert (not prev or set(map(len, prev)) == {1}) and set(map(len, b[k])) == {1}
# Convert protocol -> dict map to hashable tuple of protocol + sorted key value pairs
to_hashable = lambda itm: (itm[0], *chain.from_iterable(sorted(itm[1].items()))) # noqa
# Get the set of previous tasks
Expand Down

0 comments on commit 4308f6d

Please sign in to comment.