Skip to content

Conversation

@lazyoracle
Copy link
Member

What

Add tests and cleanup algorithms library

Why

Total test coverage is getting affected by stale, unused, legacy code that is not (and need not be) tested. Additionally, presence of incorrect and incomplete implementations of algorithms might end up with erroneous results for 3rd party users.

How

  • remove incomplete/incorrect adam, rmsprop, adadelta
  • remove commented code blocks
  • add test for lbfgs_grad_free
  • add warnings for untested algos
  • add test for sweep
  • add test for grid2D

Remarks

Expected to increase the test coverage of c3/libraries/algorithms.py to 50%+

5fdk33

Checklist

Please include and complete the following checklist. Your Pull Request is (in most cases) not ready for review until the following have been completed. You can create a draft PR while you are still completing the checklist. Check the Contribution Guidelines for more details. You can mark an item as complete with the - [x] prefix

  • Tests - Added unit tests for new code, regression tests for bugs and updated the integration tests if required
  • Formatting & Linting - black and flake8 have been used to ensure styling guidelines are met
  • Type Annotations - All new code has been type annotated in the function signatures using type hints
  • Docstrings - Docstrings have been provided for functions in the numpydoc style
  • Documentation - The tutorial style documentation has been updated to explain changes & new features
  • Notebooks - Example notebooks have been updated to incorporate changes and new features

@lazyoracle lazyoracle added the code-quality General code quality related issues and PRs label Jul 3, 2021
@lazyoracle lazyoracle added this to the 1.3 milestone Jul 3, 2021
@lazyoracle lazyoracle self-assigned this Jul 3, 2021
@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #124 (eb23dfe) into dev (171b24d) will increase coverage by 0.89%.
The diff coverage is 30.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #124      +/-   ##
==========================================
+ Coverage   65.28%   66.18%   +0.89%     
==========================================
  Files          36       36              
  Lines        5292     5267      -25     
==========================================
+ Hits         3455     3486      +31     
+ Misses       1837     1781      -56     
Impacted Files Coverage Δ
c3/libraries/algorithms.py 51.72% <30.00%> (+15.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 171b24d...eb23dfe. Read the comment docs.

@lazyoracle lazyoracle merged commit 9d043b8 into q-optimize:dev Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality General code quality related issues and PRs size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant