automl / neps

Neural Pipeline Search (NePS): Helps deep learning experts find the best neural pipeline.
https://automl.github.io/neps/
Apache License 2.0
39 stars 11 forks source link

[Refactoring] `get_loss/cost/learning_curve()` #78

Open eddiebergman opened 2 months ago

eddiebergman commented 2 months ago

While doing some small migrations to ruff as part of #77, I noticed that get_loss/cost/learning_curve() are always done on a ConfigResult object, i.e. get_loss(config_result.result, ...). I will just move these to be methods directly on the config object instead of round-abouting to the aforementioned standalone functions. This means any consumers of ConfigResult can just do config_result.loss(...). This is also hiding behind one more abstraction in the BaseOptimizer which essentially wraps these methods with the extra parameters ... filled in.