Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances activity analysis by integrating visual activity data into the naming process. The main purpose is to include activity stream charts (speed, heart rate, altitude, cadence) as visual context for LLM-based activity naming, while also updating to a stable LLM model version.
- Adds stream data visualization with PNG chart generation for activities
- Updates LLM model from experimental version to stable "gemini-2.5-pro"
- Integrates binary chart data into the naming prompt workflow
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/post_event.py | Updates LLM model to stable version |
| src/tasks/etl/single_activity_etl.py | Adds activity stream data extraction and chart generation |
| src/tasks/etl/naming_strategies/v2/prompt_v2.j2 | Updates prompt template to reference attached chart image |
| src/tasks/etl/naming_strategies/v2/naming_strategy_v2.py | Integrates binary chart data into prompt generation |
| src/tasks/etl/naming_strategies/base.py | Removes debug file writing |
| src/tasks/etl/naming_strategies/agent.py | Handles binary content in prompt processing |
| src/tasks/etl/naming_etl.py | Includes stream_data in activity processing |
| src/scripts/explore_streams.py | New exploration script for stream data analysis |
| src/scripts/explore_location_2.py | New exploration script for route similarity analysis |
| src/database/models.py | Adds stream_data column to Activity model |
| src/database/migrations/versions/85ab3d6b2278_add_stream_data_column_to_activity.py | Database migration for new column |
| pyproject.toml | Adds visualization and ML dependencies |
Comments suppressed due to low confidence (1)
| binary_data = f.read() | ||
|
|
||
| os.remove(filename) | ||
|
|
There was a problem hiding this comment.
Writing and then immediately reading the image file creates unnecessary I/O overhead. Consider using fig.to_image() method to get binary data directly without temporary file creation.
Suggested change
| binary_data = fig.to_image(format="png", scale=2, width=width, height=height) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.