alan-turing-institute / autoemulate

emulate simulations easily
MIT License
15 stars 1 forks source link

Update Bayes search for NN modules #205

Closed bryanlimy closed 3 months ago

bryanlimy commented 3 months ago
github-actions[bot] commented 3 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  autoemulate
  hyperparam_searching.py
  autoemulate/emulators
  neural_net_torch.py
  autoemulate/emulators/neural_networks
  mlp.py
  rbf.py 332-336
  tests
  test_torch.py
Project Total  

This report was generated by python-coverage-comment-action

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 90.83%. Comparing base (b512fe3) to head (59ee578).

Files Patch % Lines
autoemulate/emulators/neural_networks/rbf.py 33.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #205 +/- ## ========================================== + Coverage 90.61% 90.83% +0.22% ========================================== Files 45 45 Lines 2269 2281 +12 ========================================== + Hits 2056 2072 +16 + Misses 213 209 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bryanlimy commented 3 months ago

@mastoffel I think it is unavoidable that some of the MLP search cases would return NaN, especially with adam optimizer

mastoffel commented 3 months ago

@mastoffel I think it is unavoidable that some of the MLP search cases would return NaN, especially with adam optimizer

@bryanlimy Ah, I think for me it seems to come from sgd, when I remove it I don't really get NaN warnings. Is that different for you?

bryanlimy commented 3 months ago

@mastoffel I think it is unavoidable that some of the MLP search cases would return NaN, especially with adam optimizer

@bryanlimy Ah, I think for me it seems to come from sgd, when I remove it I don't really get NaN warnings. Is that different for you?

Sorry yes I meant to say SGD. Same issue in https://github.com/alan-turing-institute/autoemulate/issues/191#issuecomment-1967106309

bryanlimy commented 3 months ago

@mastoffel setting a higher minimum learning rate seems to be ok for now. I found a number of Issues where users report ValueError: Input y contains NaN. with BayesSearchCV, I will need to check if it is cause by something else in our code. Ideally we would want the searcher to move on to the next settings if the current model report NaN.

mastoffel commented 3 months ago

@mastoffel setting a higher minimum learning rate seems to be ok for now. I found a number of Issues where users report ValueError: Input y contains NaN. with BayesSearchCV, I will need to check if it is cause by something else in our code. Ideally we would want the searcher to move on to the next settings if the current model report NaN.

@bryanlimy

mastoffel commented 3 months ago

@bryanlimy ok, seems to work now!