ramp-workflow icon indicating copy to clipboard operation
ramp-workflow copied to clipboard

Hyperopts

Open martin1tab opened this issue 1 year ago • 8 comments

This PR modifies the following in ramp hyperopt:

  1. --n-trials instead of --n-iter
  2. Summary.csv will contain one line per fold, not the mean.
  3. There is --resume so if the long run crashes, it is possible to ressume.
  4. There are now engines of the type "ray_", like ray_hebo. hebo, ax, blend_search.

martin1tab avatar Aug 01 '22 19:08 martin1tab

Codecov Report

Base: 83.15% // Head: 75.69% // Decreases project coverage by -7.45% :warning:

Coverage data is based on head (c0d2f11) compared to base (4c71c23). Patch coverage: 22.32% of modified lines in pull request are covered.

:exclamation: Current head c0d2f11 differs from pull request most recent head a3e2565. Consider uploading reports for the commit a3e2565 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #313      +/-   ##
==========================================
- Coverage   83.15%   75.69%   -7.46%     
==========================================
  Files         137      139       +2     
  Lines        4748     4855     +107     
==========================================
- Hits         3948     3675     -273     
- Misses        800     1180     +380     
Impacted Files Coverage Δ
rampwf/hyperopt/cli/hyperopt.py 0.00% <0.00%> (ø)
rampwf/tests/kits/titanic/problem.py 100.00% <ø> (ø)
rampwf/hyperopt/hyperopt.py 13.03% <8.29%> (-85.62%) :arrow_down:
rampwf/hyperopt/engines/random_engine.py 18.75% <18.75%> (ø)
rampwf/hyperopt/engines/generic_engine.py 42.85% <42.85%> (ø)
rampwf/utils/cli/show.py 76.40% <92.00%> (ø)
rampwf/__init__.py 100.00% <100.00%> (ø)
rampwf/hyperopt/__init__.py 100.00% <100.00%> (ø)
rampwf/hyperopt/engines/__init__.py 100.00% <100.00%> (ø)
rampwf/score_types/__init__.py 100.00% <100.00%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Aug 22 '22 12:08 codecov[bot]

It seems windows tests are failing because of the netcdf library, @rth do you have any suggestion what to do?

kegl avatar Aug 22 '22 12:08 kegl

CI fails because there are no binary wheels for Python 3.6 and 3.7 for netcdf4 and it misses the headers to build it from sources (which is particularly difficult on Windows).

What we could do is either,

  • pin netcdf4 to an earlier version for now
  • or better upgrade CI to test Python 3.8+ (preferable in a separate PR ) which will not have this issue.

BTW, if possible it might be better to keep ray an optional dependency as itself it has a lot of dependencies (particularly if we don't need it to run submissions on the ramp-board server)

rth avatar Aug 22 '22 13:08 rth

@rth @kegl any idea on how to solve this new error ?

import file mismatch: imported module 'rampwf.prediction_types.tests.test_mixed_predictions' has this file attribute: /usr/share/miniconda/envs/testenv/lib/python3.7/site-packages/rampwf/prediction_types/tests/test_mixed_predictions.py which is not the same as the test file we want to collect: /home/runner/work/ramp-workflow/ramp-workflow/rampwf/prediction_types/tests/test_mixed_predictions.py HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules

martin1tab avatar Aug 29 '22 22:08 martin1tab

Do you see the error when you run pytest locally on your machine?

It seems this error was generated when you added the hyperopt test, no? Maybe some globals are clashing with other tests, like PATH?

kegl avatar Sep 06 '22 09:09 kegl

CI fails because there are no binary wheels for Python 3.6 and 3.7 for netcdf4 and it misses the headers to build it from sources (which is particularly difficult on Windows).

What we could do is either,

* pin netcdf4 to an earlier version for now

* or better upgrade CI to test Python 3.8+ (preferable in a separate PR ) which will not have this issue.

What I propose is to let this error stay for now. @SofianChay will work on the time series tools in the next months, one of the goals is to get rid of netcfd and replace the test with a simpler use case using csvs.

kegl avatar Sep 06 '22 09:09 kegl

BTW, if possible it might be better to keep ray an optional dependency as itself it has a lot of dependencies (particularly if we don't need it to run submissions on the ramp-board server)

Awesome, that is exactly what I had in mind but don't know how to do it. Yes, ramp-hyperopt is optional, not needed for the server, so we should make ray tune import also optional. @rth Can you do this once @martin1tab fixes the new clash?

kegl avatar Sep 06 '22 09:09 kegl

@martin1tab We noticed that there were a lot of formatting changes unrelated to the PR (' to ", to mention one; the convention on RAMP is single quote). Pls take these off the PR.

kegl avatar Sep 09 '22 14:09 kegl