Skip to content

Conversation

@klei22
Copy link
Collaborator

@klei22 klei22 commented Feb 1, 2026

image

This pull request adds new documentation to the README.md describing how to view CSV logs in a live, tensorboard-like interface. The update provides instructions and usage details for the new logging/view_csv_logs.py script, including its options for customizing the display and behavior.

Documentation improvements:

  • Added a section to the README.md explaining how to use the view_csv_logs.py script to visualize bulk CSV logs in a live-updating, tensorboard-style chart, including command-line options for customization.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new CLI tool to visualize bulk CSV training logs (train/val loss) in a live-updating, TensorBoard-like interface, and documents how to use it.

Changes:

  • Added logging/view_csv_logs.py to render live train/val loss charts from bulk_*.csv logs (terminal UI via rich, optional matplotlib mode).
  • Updated README.md with usage instructions and CLI options for the new viewer.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
logging/view_csv_logs.py New live CSV log viewer (ASCII/terminal rendering + optional matplotlib rendering).
README.md Documents how to run the new viewer and describes key options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +106 to +112
def load_csv_series(path: str, x_col_index: int, max_points: int) -> CsvSeries:
x_values: list[float] = []
train_values: list[float] = []
val_values: list[float] = []
with open(path, newline="") as handle:
reader = csv.reader(handle)
for row in reader:
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_csv_series opens files without handling FileNotFoundError/OSError. In live mode, a file can disappear or be rotated between glob() and open(), which will crash the whole UI. Consider catching these exceptions and returning an empty CsvSeries (or skipping the file) so the viewer stays up.

Copilot uses AI. Check for mistakes.
console = Console()
use_matplotlib = args.mode == "matplotlib"
if use_matplotlib:
import matplotlib.pyplot as plt
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When --mode matplotlib is selected and matplotlib isn't installed, the script will raise an ImportError with a stack trace. Since matplotlib isn't listed in the main install command in the README, consider catching the import error and emitting a clear message like "Install matplotlib to use --mode matplotlib" (and exit with a non-zero code).

Suggested change
import matplotlib.pyplot as plt
try:
import matplotlib.pyplot as plt
except ImportError:
console.print(
"[bold red]Install matplotlib to use --mode matplotlib[/bold red]"
)
raise SystemExit(1)

Copilot uses AI. Check for mistakes.
seconds, and can be switched to a tokens X-axis with `--x-axis tokens`. Use
`--layout horizontal` to place the legend beside the graph, or set the chart
height with `--height`. Use `--max-x` to control the X-axis scale (default 3000
iters/tokens). For a matplotlib window, add `--mode matplotlib`.
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section suggests using --mode matplotlib, but the README installation instructions don’t include matplotlib and the script will fail without it. Please add a brief note that matplotlib is an optional dependency (e.g., install via pip install matplotlib) when using that mode.

Suggested change
iters/tokens). For a matplotlib window, add `--mode matplotlib`.
iters/tokens). For a matplotlib window, add `--mode matplotlib`. This mode
requires the optional `matplotlib` dependency (for example, install via
`pip install matplotlib`).

Copilot uses AI. Check for mistakes.
break
time.sleep(args.refresh_seconds)
except KeyboardInterrupt:
pass
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
pass
# Allow user to exit with Ctrl-C without showing a traceback.
return

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gkielian gkielian merged commit d733a78 into ReaLLMASIC:master Feb 4, 2026
10 checks passed
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