Skip to content

Conversation

@alicup29
Copy link
Collaborator

…iewer

@alicup29 alicup29 requested review from Copilot and eberrigan and removed request for Copilot June 13, 2025 21:21
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

This PR integrates a LossViewer component into the remote training progress reporting workflow using RTC. It enhances the client by adding LossViewer support for displaying progress messages and includes minor version updates.

  • Adds LossViewer, QtImageDirectoryWidget, and related training configuration imports.
  • Introduces new parameters and logic to update the LossViewer with progress reports from the worker.
  • Updates the project version in pyproject.toml.

Reviewed Changes

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

File Description
sleap_client/client.py Adds LossViewer integration and handles progress report updates via RTC.
pyproject.toml Bumps project version to reflect new release.

Comment on lines 408 to 414
if win:
win._check_messages(
# Progress should be result from jsonpickle.decode(msg_str)
rtc_msg=progress
)
else:
logging.info(f"No monitor window available! win is {win}")
Copy link

Copilot AI Jun 13, 2025

Choose a reason for hiding this comment

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

The logic for updating the LossViewer with progress reports is duplicated in both string and bytes message handling blocks; consider refactoring this into a shared helper function to reduce redundancy.

Suggested change
if win:
win._check_messages(
# Progress should be result from jsonpickle.decode(msg_str)
rtc_msg=progress
)
else:
logging.info(f"No monitor window available! win is {win}")
_update_loss_viewer(win, progress)

Copilot uses AI. Check for mistakes.
reconnecting = False
reconnect_attempts = 0
output_dir = ""
win = None
Copy link

Copilot AI Jun 13, 2025

Choose a reason for hiding this comment

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

[nitpick] Using a global variable 'win' to manage the LossViewer instance can make the code harder to maintain; consider encapsulating this state within a class or passing it as a parameter to improve modularity.

Copilot uses AI. Check for mistakes.
@alicup29 alicup29 self-assigned this Jul 7, 2025
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