Closed nhansendev closed 1 year ago
ModuleNotFoundError are on purpose. Users were complaining that we can not easily import / install nevergrad because of the many dependencies. So for some methods, the user has to install them by himself. However, after git clone, pip install -e .[all] will install everything.
For warnings I agree that many of them should just be removed all together... I'll do that. This is done in branch "newsmooth" and will be merged in nevergrad 0.14.0.
I guess the warning for budget < 60 appears with budget >60 when an algorithm distributes the budget among several algorithms (bet and run) and each of them has therefore a low budget.
Steps to reproduce
Run the following script:
Observed Results
RandomSearch: OK QORandomSearch: OK ORandomSearch: OK RandomSearchPlusMiddlePoint: OK MetaRecentering: OK MetaTuneRecentering: OK HullAvgMetaTuneRecentering: OK HullAvgMetaRecentering: OK AvgMetaRecenteringNoHull: OK HaltonSearch: OK HaltonSearchPlusMiddlePoint: OK LargeHaltonSearch: OK ScrHaltonSearch: OK ScrHaltonSearchPlusMiddlePoint: OK HammersleySearch: OK HammersleySearchPlusMiddlePoint: OK ScrHammersleySearchPlusMiddlePoint: OK ScrHammersleySearch: OK QOScrHammersleySearch: OK OScrHammersleySearch: OK CauchyScrHammersleySearch: OK LHSSearch: OK CauchyLHSSearch: OK DE: OK TwoPointsDE: OK RotatedTwoPointsDE: OK LhsDE: OK QrDE: OK NoisyDE: OK AlmostRotationInvariantDE: OK RotationInvariantDE: OK RecES: OK RecMixES: OK RecMutDE: OK ES: OK MixES: OK MutDE: OK NonNSGAIIES: OK NelderMead: OK CmaFmin2: OK Powell: OK RPowell: OK Cobyla: OK RCobyla: OK SQP: OK RSQP: OK /home/nate/.local/lib/python3.10/site-packages/nevergrad/optimization/recastlib.py:263: NevergradRuntimeWarning: with this optimizer, it is more efficient to set num_objectives before the optimization begins warnings.warn( PymooNSGA2: --------- ERR OnePlusOne: OK NoisyOnePlusOne: OK DiscreteOnePlusOne: OK PortfolioDiscreteOnePlusOne: OK DiscreteLenglerOnePlusOne: OK AdaptiveDiscreteOnePlusOne: OK AnisotropicAdaptiveDiscreteOnePlusOne: OK DiscreteBSOOnePlusOne: OK DiscreteDoerrOnePlusOne: OK CauchyOnePlusOne: OK OptimisticNoisyOnePlusOne: OK OptimisticDiscreteOnePlusOne: OK NoisyDiscreteOnePlusOne: OK DoubleFastGADiscreteOnePlusOne: OK SparseDoubleFastGADiscreteOnePlusOne: OK RecombiningPortfolioOptimisticNoisyDiscreteOnePlusOne: OK RecombiningPortfolioDiscreteOnePlusOne: OK CMA: OK DiagonalCMA: OK EDA: OK TBPSA: OK NaiveTBPSA: OK NoisyBandit: OK RealSpacePSO: OK PSO: OK SPSA: OK RescaledCMA: OK /home/nate/.local/lib/python3.10/site-packages/nevergrad/optimization/differentialevolution.py:106: InefficientSettingsWarning: DE algorithms are inefficient with budget < 60 warnings.warn( Portfolio: OK /home/nate/.local/lib/python3.10/site-packages/nevergrad/optimization/optimizerlib.py:834: InefficientSettingsWarning: PSO is inefficient with budget < 60 warnings.warn("PSO is inefficient with budget < 60", errors.InefficientSettingsWarning) ParaPortfolio: OK ASCMADEthird: OK MultiCMA: OK TripleCMA: OK PolyCMA: OK MultiScaleCMA: OK MetaModel: OK MetaModelOnePlusOne: OK /home/nate/.local/lib/python3.10/site-packages/nevergrad/optimization/differentialevolution.py:106: InefficientSettingsWarning: DE algorithms are inefficient with budget < 60 warnings.warn( SQPCMA: OK MultiDiscrete: OK CMandAS2: OK CMandAS3: OK CM: OK BO: OK BOSplit: OK PCABO: --------- ERR BayesOptimBO: --------- ERR /home/nate/.local/lib/python3.10/site-packages/nevergrad/optimization/differentialevolution.py:106: InefficientSettingsWarning: DE algorithms are inefficient with budget < 60 warnings.warn( GeneticDE: OK ChainCMAPowell: OK ChainMetaModelSQP: OK ChainMetaModelPowell: OK ChainDiagonalCMAPowell: OK ChainNaiveTBPSAPowell: OK ChainNaiveTBPSACMAPowell: OK cGA: OK NaiveIsoEMNA: OK NGOptBase: OK Shiwa: OK NGO: OK NGOpt4: OK NGOpt8: OK NGOpt10: OK NGOpt12: OK NGOpt13: OK NGOpt14: OK NGOpt15: OK NGOpt16: OK NGOpt21: OK NGOpt36: OK NGOpt38: OK NGOpt39: OK NGOpt: OK
Modules caught by the "ModuleNotFoundError" exception: PymooNSGA2 PCABO BayesOptimBO
Note the random warnings in the list about
InefficientSettingsWarning: DE algorithms are inefficient with budget < 60
while the budget is clearly set to 100.Additionally, FCMA and NLOPT could not be called without runtime import errors not caught by the "ModuleNotFoundError" exception:
and
These dependencies are not mentioned in the documentation anywhere that I've seen, so my suggestion is to add that.
Expected Results
All optimizers are runnable without import errors.
Relevant Code
See above.