-
Notifications
You must be signed in to change notification settings - Fork 0
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
initial commit hw metrics queue #19
Conversation
Dependency Review✅ No vulnerabilities or license issues found.Scanned Manifest Files |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
+ Coverage 91.54% 91.56% +0.01%
==========================================
Files 114 114
Lines 9112 9136 +24
==========================================
+ Hits 8342 8365 +23
- Misses 770 771 +1
|
# report | ||
logger.info("Got metrics: {}", metrics_unit.model_dump()) | ||
|
||
except Empty: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding an exception with timeout so we don't block the thread indefinitely
@@ -133,8 +171,11 @@ def _log_hardware_metrics(self, interval: int) -> None: | |||
assert self.active_run is not None, "active_run should not be None" | |||
|
|||
# run hardware logger in background thread | |||
executor = concurrent.futures.ThreadPoolExecutor(max_workers=1) | |||
executor.submit(run_hardware_logger, interval, self.active_run) | |||
queue: Queue[HardwareMetrics] = Queue() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized we can assign queue without adding it to the active run
or run_manager
Pull Request
Short Summary
This second part of hw metrics contains the code to pull hw metrics and send them to a global background queue, where they are then picked up by a consumer function to be sent to the db in the third part.
Context
Continuation of getting hw metrics into opsml.