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

Allow configuration of nn ensemble learning rate #475

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

mo-fu
Copy link
Contributor

@mo-fu mo-fu commented Mar 10, 2021

When training nn-ensemble with optimizers that do not automatically adjust the learning rate it is helpful to configure it manually. Even with automatically adjusting optimizers, it may sometimes be beneficial to change the learning rate.
This pr allow to set the learning rate in the nn-ensemble project definition.
As different optimizers have different default learning rates, it is not possible to just add a default parameter. Instead the presence of a lr key in the config map is checked.

@sonarcloud
Copy link

sonarcloud bot commented Mar 10, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #475 (b8e556c) into master (5bf40f8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #475   +/-   ##
=======================================
  Coverage   99.43%   99.44%           
=======================================
  Files          67       67           
  Lines        4807     4838   +31     
=======================================
+ Hits         4780     4811   +31     
  Misses         27       27           
Impacted Files Coverage Δ
annif/backend/nn_ensemble.py 100.00% <100.00%> (ø)
tests/test_backend_nn_ensemble.py 100.00% <100.00%> (ø)
annif/suggestion.py 100.00% <0.00%> (ø)
tests/test_suggestion.py 100.00% <0.00%> (ø)

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 5bf40f8...b8e556c. Read the comment docs.

@osma osma added this to the 0.52 milestone Mar 10, 2021
@osma osma merged commit 30d4f75 into NatLibFi:master Mar 15, 2021
@osma
Copy link
Member

osma commented Mar 15, 2021

Thanks @mo-fu !

@mo-fu mo-fu deleted the nn-ensemble-config-lr branch March 15, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants