OpenAdaptAI / OpenAdapt

AI-First Process Automation with Large ([Language (LLMs) / Action (LAMs) / Multimodal (LMMs)] / Visual Language (VLMs)) Models
https://www.OpenAdapt.AI
MIT License
745 stars 99 forks source link

Fix `openadapt.visualize` and `get_audio_info` #717

Closed abrichr closed 3 weeks ago

abrichr commented 4 weeks ago

Currently openadapt.visualize produces an Exception on main:

  File "/Users/abrichr/oa/OpenAdapt/openadapt/visualize.py", line 189, in main
    audio_info = row2dict(crud.get_audio_info(recording))
                 |        |    |              -> Recording(id=13, timestamp=1717686247.322987, monitor_width=1512, monitor_height=982, double_click_interval_seconds=0.5, doub...
                 |        |    -> <function get_audio_info at 0x1695b2710>
                 |        -> <module 'openadapt.db.crud' from '/Users/abrichr/oa/OpenAdapt/openadapt/db/crud.py'>
                 -> <function row2dict at 0x1694e8160>

TypeError: get_audio_info() missing 1 required positional argument: 'recording_timestamp'

Seems related:

# TODO: change to use recording_id once scrubbing PR is merged
def get_audio_info(
    session: SaSession,
    recording_timestamp: float,
) -> list[AudioInfo]:
abrichr commented 4 weeks ago

Currently produces:

sqlalchemy.exc.ArgumentError: SQL expression element or literal value expected, got Recording(id=13, timestamp=1717686247.322987,
KIRA009 commented 3 weeks ago

I believe this got fixed with the above PR? Tested on main and it looks like it