Skip to content

Commit

Permalink
update recording table filter call for changed API of new glassesTool…
Browse files Browse the repository at this point in the history
…s version
  • Loading branch information
dcnieho committed Sep 22, 2024
1 parent 1b27ff4 commit 36d1425
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
glassesTools[GUI]==1.10.4 # pulls in various other dependencies such as imgui_bundle, matplotlib, numpy, opencv, pandas, polars
glassesTools[GUI]==1.10.5 # pulls in various other dependencies such as imgui_bundle, matplotlib, numpy, opencv, pandas, polars
I2MC
aiosqlite
uvloop ; sys_platform != "win32"
Expand Down
6 changes: 3 additions & 3 deletions src/glassesValidator/GUI/_impl/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class FilterMode(AutoName):

@dataclasses.dataclass
class Filter(BaseFilter):
fun: typing.Callable[[gt_rec], bool] = dataclasses.field(init=False)
fun: typing.Callable[[int|str, gt_rec], bool] = dataclasses.field(init=False)
mode: FilterMode
match = None

Expand All @@ -103,9 +103,9 @@ def __post_init__(self):
# set fun
match self.mode:
case FilterMode.Eye_Tracker:
self.fun = lambda rec: rec.eye_tracker == self.match
self.fun = lambda _, rec: rec.eye_tracker == self.match
case FilterMode.Task_State:
self.fun = lambda rec: get_simplified_task_state(rec.task) == self.match
self.fun = lambda _, rec: get_simplified_task_state(rec.task) == self.match
case _:
raise NotImplementedError()

Expand Down

0 comments on commit 36d1425

Please sign in to comment.