-
Notifications
You must be signed in to change notification settings - Fork 2
Add moving average logger method #104
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this 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 pull request adds a new moving average logger along with its supporting methods, tests, and documentation updates.
- Implement moving average logger (MALogger and MALoggerRecipe) and helper functions (update_ma! and MAInfo).
- Add test cases for the moving average logger in the test folder.
- Update export lists and documentation to include the new logger types and functions.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/Solvers/Loggers/moving_average_logger.jl | Adds tests for the new moving average logger functionality. |
src/Solvers/Loggers/moving_average_logger.jl | Implements MALogger and MALoggerRecipe with moving average functionality. |
src/Solvers/Loggers/ma_helpers/ma_info.jl | Implements MAInfo and update_ma! helper functions. |
src/Solvers/Loggers/basic_logger.jl | Minor documentation update from mutable to struct. |
src/Solvers/Loggers.jl | Updates inclusion of logger files to incorporate the new moving average logger. |
src/RLinearAlgebra.jl | Updates exports to include the new logger types and functions. |
docs/src/refs.bib & docs/src/api/loggers.md | Updates documentation and references for the new moving average logger. |
Comments suppressed due to low confidence (1)
test/Solvers/Loggers/moving_average_logger.jl:12
- [nitpick] The variable 'b' is first used for a random vector and later reassigned to a logger object, which may lead to confusion. Consider using a distinct name for the logger instance (e.g., 'logger') to improve clarity.
b = rand(n_rows)
throw(ArgumentError("Field `colection_rate` must be positive.")) | ||
elseif collection_rate > max_it && max_it > 0 | ||
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a spelling error in the error message; 'colection_rate' should be 'collection_rate'.
throw(ArgumentError("Field `colection_rate` must be positive.")) | |
elseif collection_rate > max_it && max_it > 0 | |
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`.")) | |
throw(ArgumentError("Field `collection_rate` must be positive.")) | |
elseif collection_rate > max_it && max_it > 0 | |
throw(ArgumentError("Field `collection_rate` must be smaller than `max_it`.")) |
Copilot uses AI. Check for mistakes.
throw(ArgumentError("Field `colection_rate` must be positive.")) | ||
elseif collection_rate > max_it && max_it > 0 | ||
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message contains a misspelling; it should use 'collection_rate' instead of 'colection_rate'.
throw(ArgumentError("Field `colection_rate` must be positive.")) | |
elseif collection_rate > max_it && max_it > 0 | |
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`.")) | |
throw(ArgumentError("Field `collection_rate` must be positive.")) | |
elseif collection_rate > max_it && max_it > 0 | |
throw(ArgumentError("Field `collection_rate` must be smaller than `max_it`.")) |
Copilot uses AI. Check for mistakes.
Check list:
src/Solvers/Loggers
folder.include
method-related files insrc/Solvers/Loggers.jl
.RLinearAlgebra.jl
.1. Add test files (and helpers) in
test/Solvers/Loggers
folder.2. (Add new folders to
runtests.jl
if needed.)1. Add docs for all newly added structs and functions in
docs/src/api.loggers.md
.2. Add references in
refs.bib
.Closes #103.