Skip to content

WIP: Remove monitor #10565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

jonathan-eq
Copy link
Contributor

@jonathan-eq jonathan-eq commented Apr 4, 2025

Issue
Resolves #my_issue

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Add backport label to latest release (format: 'backport release-branch-name')

@jonathan-eq jonathan-eq added the release-notes:improvement Automatically categorise as improvement in release notes label Apr 4, 2025
@jonathan-eq jonathan-eq self-assigned this Apr 4, 2025
@jonathan-eq jonathan-eq added this to SCOUT Apr 4, 2025
@jonathan-eq jonathan-eq moved this to In Progress in SCOUT Apr 4, 2025
@jonathan-eq jonathan-eq force-pushed the remove-monitor branch 2 times, most recently from 81c6998 to bcf9998 Compare April 7, 2025 06:46
Copy link

codspeed-hq bot commented Apr 7, 2025

CodSpeed Performance Report

Merging #10565 will not alter performance

Comparing jonathan-eq:remove-monitor (a010046) with main (562e369)

Summary

✅ 25 untouched benchmarks

Copy link

@Copilot 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.

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

await evaluator_task
return []

logger.debug("observed that model was finished, waiting tasks completion...")
# The model has finished, we indicate this by sending a DONE
logger.debug("tasks complete")

if not self._end_queue.empty():
if self._cancelled:
print("YEGA!")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Remove the debug print 'print("YEGA!")' and replace it with an appropriate logger.debug call.

Suggested change
print("YEGA!")
logger.debug("YEGA!")

Copilot uses AI. Check for mistakes.

try:
await evaluator_task
except Exception as e:
print(f"1: {e!s}")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Remove the debug print 'print(f"1: {e!s}")' and use the logging framework (e.g. logger.error) to log exceptions.

Suggested change
print(f"1: {e!s}")
logger.error(f"1: {e!s}")

Copilot uses AI. Check for mistakes.

raise Exception(
"Exception occured during user initiatied termination of experiment"
) from e
print("RAISING USER_CANCELLED")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Remove the debug print 'print("RAISING USER_CANCELLED")' and replace it with a proper logging call.

Suggested change
print("RAISING USER_CANCELLED")
logger.debug("RAISING USER_CANCELLED")

Copilot uses AI. Check for mistakes.

raise UserCancelled("Experiment cancelled by user in post evaluation")

else:
print("HELL NAH!")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Remove the debug print 'print("HELL NAH!")' and use the logging framework for consistency.

Suggested change
print("HELL NAH!")
logger.debug("HELL NAH!")

Copilot uses AI. Check for mistakes.


async def handle_client_event(self, event: EEEvent) -> None:
if type(event) is EEUserCancel:
print("EE GOT CANCEL EVENT")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Replace the debug print 'print("EE GOT CANCEL EVENT")' with an appropriate logger.debug call to maintain consistent logging practices.

Suggested change
print("EE GOT CANCEL EVENT")
logger.debug("EE GOT CANCEL EVENT")

Copilot uses AI. Check for mistakes.

self._monitoring_result.set_result(False)
# self._clients_empty.set()
elif type(event) is EEUserDone:
print("EE GOT USER DONE EVENT")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Replace the debug print 'print("EE GOT USER DONE EVENT")' with a logger.debug call for consistent logging.

Suggested change
print("EE GOT USER DONE EVENT")
logger.debug("EE GOT USER DONE EVENT")

Copilot uses AI. Check for mistakes.

raise task_exception
elif task.get_name() == "server_task":
print("EXITED MONITOR AN DHANDLE TASKS")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Remove or replace the debug print 'print("EXITED MONITOR AN DHANDLE TASKS")' with an appropriate logger.debug statement.

Suggested change
print("EXITED MONITOR AN DHANDLE TASKS")
logger.debug("EXITED MONITOR AN DHANDLE TASKS")

Copilot uses AI. Check for mistakes.

return
elif task.get_name() in {
"ensemble_task",
"listener_task",
"ensemble_cancellation_task",
}:
timeout = self.CLOSE_SERVER_TIMEOUT
self._monitoring_result.set_result(False)
print("WAS HERE")
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Remove or replace the debug print 'print("WAS HERE")' with a proper logging call to ensure consistency.

Suggested change
print("WAS HERE")
logger.info("WAS HERE")

Copilot uses AI. Check for mistakes.

@jonathan-eq jonathan-eq moved this from In Progress to Todo in SCOUT Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant