Skip to content

Handle Targets Gracefully In Baseline And Ensemble Forecast Generation#137

Merged
sbidari merged 13 commits intomainfrom
upx3_handle_targets_gracefully_in_both_baseline_and_ensemble_forecast_generation
Feb 10, 2026
Merged

Handle Targets Gracefully In Baseline And Ensemble Forecast Generation#137
sbidari merged 13 commits intomainfrom
upx3_handle_targets_gracefully_in_both_baseline_and_ensemble_forecast_generation

Conversation

@O957
Copy link
Copy Markdown
Collaborator

@O957 O957 commented Jan 30, 2026

This PR:

  • Adds supported_diseases constant; exported c("covid", "rsv", "flu") vector in utils.R, which replaces hardcoded c("covid", "rsv") checks.
  • Adds get_unique_targets() function: reads target suffixes from hub time-series data for a given disease
  • Adds get_target_label()function: maps target suffixes to human-readable labels.
  • Updates generate_hub_baseline() with targets support: accepts optional targets parameter & defaults to all unique targets in time-series.
  • Updates generate_hub_ensemble() with targets support (same as previous point)
  • Updates composite actions for ensemble and baseline forecast production: they accept a targets input (JSON/YAML array).
  • Updates disease supports to include influenza: see get_hub_name(), get_hub_repo_name(), and get_disease_name().

How targets work with the ensemble and baseline forecast generation:

  • get_unique_targets() reads target suffixes from target-data/time-series.
  • Both baseline and ensemble functions default to targets = NULL, which gets all unique targets .
  • Both baseline and ensemble functions validate explicit targets against available targets, erroring if any are invalid.
  • Composite baseline and ensemble actions expose targets as optional JSON array, defaults to all.

@O957 O957 self-assigned this Jan 30, 2026
Comment thread R/generate_hub_baselines.R
Comment thread actions/generate-baseline/action.yaml Outdated
Copy link
Copy Markdown
Collaborator

@sbidari sbidari left a comment

Choose a reason for hiding this comment

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

It looks like some tests are failing. Can you update the failing tests?

@O957 O957 requested a review from sbidari January 30, 2026 21:29
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 0% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.66%. Comparing base (e40f4e2) to head (75ed193).

Files with missing lines Patch % Lines
R/generate_hub_baselines.R 0.00% 25 Missing ⚠️
R/utils.R 0.00% 20 Missing ⚠️
R/generate_hub_ensemble.R 0.00% 15 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #137      +/-   ##
========================================
- Coverage   9.96%   9.66%   -0.31%     
========================================
  Files         12      12              
  Lines       1144    1180      +36     
========================================
  Hits         114     114              
- Misses      1030    1066      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread R/generate_hub_baselines.R
Comment thread R/generate_hub_ensemble.R
Comment thread R/utils.R Outdated
Copy link
Copy Markdown
Collaborator

@sbidari sbidari left a comment

Choose a reason for hiding this comment

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

See comments regarding support for flu

@O957 O957 requested a review from sbidari February 4, 2026 21:51
Comment thread R/utils.R Outdated
Comment thread actions/generate-baseline/action.yaml
Comment thread R/utils.R
Comment thread R/utils.R Outdated
Comment thread R/utils.R Outdated
Comment thread R/utils.R Outdated
@O957 O957 requested a review from sbidari February 10, 2026 15:53
Comment thread R/utils.R Outdated
Comment thread R/generate_hub_baselines.R Outdated
@O957 O957 requested a review from sbidari February 10, 2026 18:40
Comment thread R/utils.R
Copy link
Copy Markdown
Collaborator

@sbidari sbidari left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @O957

@sbidari sbidari merged commit 415218a into main Feb 10, 2026
9 checks passed
@sbidari sbidari deleted the upx3_handle_targets_gracefully_in_both_baseline_and_ensemble_forecast_generation branch February 10, 2026 22:57
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.

4 participants