[WIP] Fix FT Service issue#344
Draft
artek0chumak wants to merge 1 commit intonextfrom
Draft
Conversation
6667dc1 to
5f57c82
Compare
…klines Introduces a domain-agnostic ASCII chart and sparkline rendering engine (src/together/lib/cli/utils/plots/_engine.py) and wires it into the fine-tuning CLI so training metrics are displayed as terminal charts. Engine highlights: - Figure class: composable chart builder with add_trace/plot API - sparklines: compact block-character sparkline rows per series - Pure stdlib + rich; no numpy/matplotlib dependency Bugs fixed during review: - _interpolate: replace O(n²) list scan with bisect; fix misleading docstring; correct edge-case handling for before-first and after-last - _x_labels: guard ZeroDivisionError when n_xticks < 2 - _uniform_grid: guard ZeroDivisionError when n <= 1 - _log_transform: remove stale placeholder initialisation - Figure.render: raise ValueError when traces mix log/linear y-scales - sparklines: compute independent y_grid per series to avoid mixing log-transformed and linear values on a shared scale Readability improvements: - Document the inverted coordinate system in _draw_lines - Replace sorted()[0] with min(key=...) in _to_plot_rows - Delegate Figure.plot to add_trace to eliminate duplicated body - Replace enumerate+index with zip in _render_body - Add module-level note on the two data representations - Move bisect import to top-level block
5f57c82 to
1c34308
Compare
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.