feat(cli): forward monitor tracker options - #1275
Open
lntutor wants to merge 1 commit into
Open
Conversation
Contributor
|
Hello, thanks for the contribution. Can you keep our PR template ? |
Signed-off-by: Loi Nguyen <vanloi999@gmail.com>
lntutor
force-pushed
the
fix/monitor-options-1273
branch
from
July 31, 2026 01:30
060a21e to
a3ede3f
Compare
Author
|
Updated the PR description to the complete repository template, including the required 🟠 AI-generated disclosure. I personally reviewed and tested every submitted line, understand the implementation, and can explain and support it through review and after merge. |
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.
Description
Forward tracker constructor options passed to
codecarbon monitor, including--pueand--allow-multiple-runs. Accepted option names are derived fromBaseEmissionsTracker.__init__so the CLI continues to recognize future scalar tracker options. CLI coverage verifies typed float and boolean forwarding.Related Issue
Fixes #1273
Motivation and Context
The monitor command accepted tracker configuration but did not forward several supported constructor options. This made CLI monitoring behave differently from direct tracker use.
How Has This Been Tested?
uv run python -m pytest tests/cli/test_cli_main.py -quv run ruff check codecarbon/cli/main.py tests/cli/test_cli_main.pyuv run ruff format --check codecarbon/cli/main.py tests/cli/test_cli_main.pyuv run mypy codecarbon/cli/main.pyis currently blocked by 285 existing type errors across 19 project modules.Screenshots (if appropriate):
Not applicable.
Types of changes
AI Usage Disclosure
OpenAI Codex assisted with implementation and test preparation. I personally reviewed and tested every submitted line, understand the implementation, and can explain and maintain it.
Checklist: