Skip to content

Conversation

@mitokic
Copy link
Collaborator

@mitokic mitokic commented Dec 5, 2025

This pull request introduces new configuration options to control how forecasting models are run in the finnts package, specifically allowing users to enable or disable global and local model workflows. The changes provide more flexibility in model selection, improve backward compatibility, and add safeguards to ensure consistent behavior during updates. Documentation and internal logic are updated to reflect these enhancements.

New model configuration options:

  • Added run_global_models and run_local_models arguments to the set_agent_info and set_agent_info_custom functions, allowing users to specify whether to run global (multivariate) models across all time series and/or local models for individual time series. Defaults ensure global models are off for "week" and "day" date types unless explicitly enabled. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Workflow logic and validation improvements:

  • Updated the iterate_forecast workflow to conditionally run global and local model optimization steps based on the new configuration flags, including informative messages when steps are skipped. [1] [2] [3] [4]
  • Added validation to ensure that at least one of global or local models is enabled, preventing invalid configurations.

Backward compatibility and update safeguards:

  • Enhanced logging and compatibility by handling missing columns for the new model flags when comparing previous and current agent runs, ensuring older logs remain usable.
  • In the update workflow, added checks to ensure that model type settings are consistent with previous runs, and provide clear error messages if an update would disable a previously used model type.

Documentation and metadata updates:

  • Updated documentation in DESCRIPTION, NEWS.md, and function help files to reflect the new version (0.6.0.9012) and the added configuration options. [1] [2] [3]

These changes collectively provide users with more control over forecasting strategies and improve reliability when managing and updating agent runs.

Copy link
Contributor

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.

Pull request overview

This PR introduces configuration options to control the execution of global (multivariate) and local (per-time-series) forecasting models in the finnts package. The changes provide users with flexibility to selectively enable/disable model types based on their data characteristics, with intelligent defaults and backward compatibility safeguards.

  • Added run_global_models and run_local_models parameters with smart defaults (global models default to off for daily/weekly data)
  • Updated workflow logic to conditionally skip global or local model optimization with informative messages
  • Enhanced update workflow validation to prevent inconsistent model type settings across agent runs

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
R/agent_info.R Added new parameters with validation, smart defaults based on date type, and backward compatibility handling for older agent logs
R/agent_iterate_forecast.R Updated workflow to conditionally execute global/local model optimization based on configuration flags
R/agent_update_forecast.R Added validation to ensure consistency of model type settings when updating existing agent runs
man/set_agent_info.Rd Added documentation for the new run_global_models and run_local_models parameters
NEWS.md Bumped development version to 0.6.0.9012
DESCRIPTION Updated package version to 0.6.0.9012

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@smdp2000ofc smdp2000ofc left a comment

Choose a reason for hiding this comment

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

lgtm!

@mitokic mitokic merged commit ef4b4fd into main Dec 5, 2025
9 of 16 checks passed
@mitokic mitokic deleted the mitokic/12052025/agent-global-local-update branch December 5, 2025 20:43
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.

3 participants