Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(validator): MAPE and json generation #1824

Merged

Conversation

sthaha
Copy link
Collaborator

@sthaha sthaha commented Oct 24, 2024

This commit fixes MAPE calculation and its tests.
Additionally, the json generation is cleaned and added to gen-report as well.

Copy link
Contributor

github-actions bot commented Oct 24, 2024

🤖 SeineSailor

Here is a concise summary of the pull request changes:

Summary: The chore(validator): MAPE and json generation pull request refactors the validator tool, focusing on MAPE calculation, JSON generation, and report creation.

Key Modifications:

  1. MAPE calculation: The mape function now returns the MAPE value multiplied by 100, which may affect applications using this function.
  2. JSON generation: The create_json function and its helpers are removed, replaced by write_json_report and asdict for JSON generation.
  3. Report creation: The JsonTemplate class is updated, removing file_path, machine_spec, and result parameters, and adding machine_specs and results instead.
  4. Custom object handling: The CustomEncoder class is improved to better handle custom objects and datetime objects.

Impact on Codebase:

  • Applications using the mape function may need to adjust for the changed return value.
  • Functions calling the removed validate_arrays function may be affected.
  • The external interface remains unaffected, but internal changes may require adjustments in dependent code.

Suggestions for Improvement:

  • Consider adding tests to ensure the mape function's changed return value does not break existing functionality.
  • Document the changes to the JsonTemplate class and CustomEncoder to facilitate understanding and adoption.
  • Review dependent code for potential issues related to the removed validate_arrays function.

@sthaha sthaha force-pushed the fix-validator-mape-again branch from e9e5f1d to 1a2a5f1 Compare October 24, 2024 06:09
This commit fixes MAPE calculation and its tests.
Additionally, the json generation is cleaned and added to `gen-report`
as well.

Signed-off-by: Sunil Thaha <[email protected]>
@sthaha sthaha force-pushed the fix-validator-mape-again branch from 1a2a5f1 to d0fe966 Compare October 24, 2024 06:21
@sthaha sthaha merged commit 0f5c40e into sustainable-computing-io:main Oct 24, 2024
21 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