Skip to content

Conversation

@mitokic
Copy link
Collaborator

@mitokic mitokic commented Dec 10, 2025

This pull request introduces enhancements to the agent forecasting workflow in the finnts package, focusing on better tracking and management of forecast run iterations and completion status. The changes improve how the system determines when to skip or proceed with model optimization, add metadata for backward compatibility, and introduce a new mechanism for finalizing agent runs. Additionally, minor version and documentation updates are included.

Agent run tracking and workflow improvements:

  • Added max_iterations and run_complete columns to agent run tracking, allowing more precise control over when model optimization should be skipped or continued. This includes backward compatibility for existing runs and ensures local models only run when necessary. (R/agent_iterate_forecast.R, [1] [2]
  • Introduced the finalize_run function, which updates metadata for each combo after a run completes, marking runs as complete and setting the max iteration count. This function is now integrated into the agent workflow, replacing the previous "stop" node with "finalize_run" for proper finalization. (R/agent_iterate_forecast.R, [1] [2] [3]

Data and code hygiene:

  • Updated the saving process for best agent runs to remove unnecessary columns (run_complete, max_iterations) before persisting results, keeping log files clean. (R/agent_iterate_forecast.R, R/agent_iterate_forecast.RR794-R797)
  • Registered new global variables (max_iterations, run_complete) to avoid warnings in package checks. (R/utility.R, R/utility.RL30-R31)

Documentation and versioning:

  • Incremented package version to 0.6.0.9014 and updated the news file to reflect the latest development changes. (DESCRIPTION, [1]; NEWS.md, [2]…er when iterate process has to be restarted

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 enhances the agent forecasting workflow by introducing a new finalize_run step that properly tracks forecast run completion and iteration counts. The changes enable better management of model optimization, ensuring local models only run when necessary and allowing interrupted processes to resume correctly.

Key Changes:

  • Added max_iterations and run_complete columns to agent run tracking with backward compatibility support for existing runs
  • Introduced a new finalize_run function integrated into the workflow to update metadata when runs complete
  • Modified the workflow to route through finalize_run before stopping, replacing direct routing to the "stop" node

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
R/agent_iterate_forecast.R Implements finalize_run function, adds run completion tracking logic, updates workflow nodes to route through finalize_run, and adds backward compatibility for new metadata columns
R/utility.R Registers new global variables (max_iterations, run_complete) to prevent package check warnings
NEWS.md Updates version number to 0.6.0.9014 for development tracking
DESCRIPTION Bumps package version to 0.6.0.9014

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

@mitokic mitokic requested a review from Copilot December 10, 2025 19:00
@mitokic mitokic marked this pull request as ready for review December 10, 2025 19:02
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


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

@mitokic mitokic requested a review from smdp2000ofc December 10, 2025 19:09
@mitokic mitokic merged commit a70e484 into main Dec 10, 2025
3 of 10 checks passed
@mitokic mitokic deleted the mitokic/12082025/agent-iterate-updates branch December 10, 2025 20:02
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