ML-for-B-E / nevergrad

A Python toolbox for performing gradient-free optimization
https://facebookresearch.github.io/nevergrad/
MIT License
2 stars 0 forks source link

Add and end-to-end test runned by a CI to make sure we can always run an experiment #8

Closed akouete-kpakpo closed 2 years ago

akouete-kpakpo commented 2 years ago

Target

Make sure we can always run an experiment without error

Tasks

akouete-kpakpo commented 2 years ago

Running python -m nevergrad.benchmark rice_irrigation --num_workers=6 --plot is too long to be integrated in a CI

I have to implement a quicker test but even the simple call to

from nevergrad.functions.irrigation import Irrigation

func = Irrigation(2)

is too long.

I started a profiler and the problem seems to come from the line https://github.com/akouete-kpakpo/nevergrad/blob/e94ba9f0a1ceed9edc2a3d036a3027a933e65cec/nevergrad/functions/irrigation/irrigation.py#L52.

I have to understand why this for loop on 1k samples. Then I can move it to a parameter of the class so that CI would build the function with only 1 sample

akouete-kpakpo commented 2 years ago

make pytest var=nevergrad/functions/irrigation/ mark=ut to launch unit tests on irrigation