Skip to content

Conversation

@mitokic
Copy link
Collaborator

@mitokic mitokic commented Oct 30, 2025

This pull request updates the version to 0.6.0.9007 and introduces significant improvements to the model summarization process in the finnts package. The main changes focus on more robust error handling and direct file reading for model and forecast data, ensuring that the summarization step is both accurate and resilient to missing or mismatched data. Additionally, the test workflow is updated to use a stricter error threshold.

Model summarization and error handling improvements:

  • The summarize_models function now reads trained model and forecast files directly, with improved logic for handling global and local model types, and provides clearer error messages when expected data is missing.
  • Additional error checks have been added to ensure the number of summarized combos matches expectations and that all best models are included; the function will stop execution if these conditions are not met.

Version and documentation updates:

  • Updated the package version in DESCRIPTION and NEWS.md to 0.6.0.9007. [1] [2]

Testing improvements:

  • The test for the full agent workflow now uses a stricter weighted_mape_goal of 0.08 (previously 0.10) to better validate forecasting accuracy.

@mitokic mitokic requested a review from Copilot October 30, 2025 18:19
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 refactors the model summarization logic to improve reliability and adds better error handling. The version is bumped to 0.6.0.9007.

  • Replaces abstract function calls (get_trained_models, get_forecast_data) with direct file reading operations for better control
  • Adds explicit validation checks to ensure all expected combos and best models are properly summarized
  • Updates test to use a slightly more lenient performance threshold (0.08 vs 0.10)

Reviewed Changes

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

File Description
R/agent_summarize_models.R Refactors model/forecast data retrieval to use direct file reads instead of wrapper functions, adds hash variables for different file types, implements comprehensive error handling for missing data, and validates summary completeness
tests/testthat/test-agent.R Updates weighted_mape_goal from 0.10 to 0.08 for stricter test validation
NEWS.md Bumps development version to 0.6.0.9007
DESCRIPTION Updates package version to 0.6.0.9007
Comments suppressed due to low confidence (1)

R/agent_summarize_models.R:275

  • Redundant condition check. Line 268 already stops execution when nrow(forecast_tbl) == 0, so this check at line 275 will always be true and is unnecessary.
      if (nrow(forecast_tbl) > 0) {

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

mitokic and others added 2 commits October 30, 2025 11:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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