Skip to content

Bug Fixes: multiple minor bugs, which only surfaced in training mode#15

Merged
rbx merged 1 commit into
FairRootGroup:masterfrom
enlorenz:wip/integration
Jan 23, 2026
Merged

Bug Fixes: multiple minor bugs, which only surfaced in training mode#15
rbx merged 1 commit into
FairRootGroup:masterfrom
enlorenz:wip/integration

Conversation

@enlorenz

Copy link
Copy Markdown
Collaborator

train.py: dashboard reward plots now also use BooleanOptionAction so that plots appear.
environment.py: added "running_jobs" tracker for dashboard.
metrics_tracker.py: added "running_jobs" tracker for dashboard.
plot_config.py: set reward booleans to be True
test_plotter.py: adjusted setters for PlotConfig, so that test logic now fits to reworked plotting logic.

train.py: dashboard reward plots now also use BooleanOptionAction so that plots appear.
environment.py: added "running_jobs" tracker for dashboard.
metrics_tracker.py: added "running_jobs" tracker for dashboard.
plot_config.py: set reward booleans to be True
test_plotter.py: adjusted setters for PlotConfig, so that test logic now fits to reworked plotting logic.
@coderabbitai

coderabbitai Bot commented Jan 23, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request introduces tracking metrics for currently running jobs in the environment and metrics system, and changes the default behavior of several plot configuration flags from disabled to enabled. CLI argument parsing is updated to support both positive and negative forms (e.g., --plot-eff-reward and --no-plot-eff-reward).

Changes

Cohort / File(s) Summary
Running jobs metrics tracking
src/environment.py, src/metrics_tracker.py
Adds per-step and per-episode tracking of currently running jobs. environment.py computes num_running_jobs and stores it in metrics; metrics_tracker.py introduces current_running_jobs timeline counter and episode_running_jobs_counts per-episode accumulator.
Plot configuration defaults
src/plot_config.py
Changes default values of five boolean fields from False to True: plot_eff_reward, plot_price_reward, plot_idle_penalty, plot_job_age_penalty, plot_total_reward.
CLI argument parsing
train.py
Replaces store_true action with argparse.BooleanOptionalAction and default=True for eight plot-related CLI flags: --plot-eff-reward, --plot-price-reward, --plot-idle-penalty, --plot-job-age-penalty, --plot-total-reward, --plot-price, --plot-online-nodes, --plot-used-nodes. Enables both positive and negative forms (e.g., --no-plot-eff-reward).
Test fixtures
test/test_plotter.py
Updates MockEnv.plot_config flags to match new enabled defaults and expands test_skip_all_panels to explicitly disable a broader set of plot flags, ensuring test coverage for the all-panels-disabled scenario.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title mentions 'multiple minor bugs' and 'training mode' but the changeset covers diverse modifications including environment tracking, metrics collection, plot configuration defaults, and CLI argument parsing—not clearly 'bug fixes' in the traditional sense. Consider a more specific title that reflects the actual changes, such as 'Enable reward plot visibility and add running jobs tracking' or 'Update plotting defaults and CLI argument handling.'
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description aligns well with the changeset, detailing all five modified files and their purposes: dashboard plotting improvements, running jobs tracking, plot configuration updates, and test adjustments.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rbx rbx merged commit 3b58b87 into FairRootGroup:master Jan 23, 2026
4 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