Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to visualize planned tasks in logs #31

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

humpydonkey
Copy link
Collaborator

It's not easy to see what tasks are planned, their dependencies, and the tool and its params in the log.
This PR improves it.

pretty print the planned tasks:

INFO:vision_agent.agent.vision_agent:Planned tasks:
┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━┑
│ task                                                                                                                         │   id │ dep    │
┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━┿━━━━━━━━┥
│ Extract image frames from the video file '/Users/asia/Downloads/frames/baby_cam1_40s.MP4' by 'extract_frames_'               │    1 │ [-1]   │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────┼────────┤
│ Detect and count the number of bigger beds in each frame extracted by task 1 with input 'bigger bed' by 'counter_'           │    2 │ [1]    │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────┼────────┤
│ Detect and count the number of babies in each frame extracted by task 1 with input 'baby' by 'counter_'                      │    3 │ [1]    │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────┼────────┤
│ For each frame, verify if the count of bigger beds from task 2 is more than 0 and count of babies from task 3 is more than 0 │    4 │ [2, 3] │
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━┙

Pretty print the executed tool with params:

┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
│ task                                                                                                           │ tool_name       │ parameters                                                      │
┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
│ Extract image frames from the video file '/Users/asia/Downloads/frames/baby_cam1_40s.MP4' by 'extract_frames_' │ extract_frames_ │ {'video_uri': '/Users/asia/Downloads/frames/baby_cam1_40s.MP4'} │
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

@humpydonkey humpydonkey merged commit e99a9f6 into main Mar 27, 2024
7 checks passed
@humpydonkey humpydonkey deleted the improve-debugging branch March 27, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants