feat: add last query#1682
Conversation
There was a problem hiding this comment.
Code Review
This pull request translates docstrings from Chinese to English across several SwanLab API files and introduces a new last parameter to the RangeQuery model to filter scalar metrics by a recent time window (in milliseconds). The CSV streaming parser is updated to support this filtering mode, and validation is added to ensure last is mutually exclusive with start and end parameters. There are no review comments, so no feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request increases the default pagination page size from 20 to 100 across various API endpoints, translates and expands several docstrings to English, and removes the artificial random sleep from the pagination helper. It also refactors metric fetching by introducing concurrent batching and CSV downloading via a thread pool, and updates the CLI commands to utilize these new classes. A critical logical issue was identified in swanlab/api/column.py where the auto-pagination query fails to set all=False when filters are present, which would cause the backend to ignore the filters; a code suggestion has been provided to fix this.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request increases the default pagination page size from 20 to 100 across several API endpoints, updates and translates docstrings to English, and removes the artificial sleep delay in pagination. It also refactors the metrics querying system to support batching, concurrency, and caching, and introduces a new last parameter to RangeQuery for filtering metrics by a recent time window. In the CLI, commands are updated to use the new Metrics and Summary classes, and redundant checks are cleaned up. The review feedback suggests tracking whether a warning about a missing timestamp column has already been logged during CSV parsing to prevent console flooding and performance degradation on large files.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Description
lasttime range queryTODO: skills & docs