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

Standardize yaml path definitions for the neps arguments #70

Closed danrgll closed 2 weeks ago

danrgll commented 2 months ago

Currently, neps.run() loads an optimizer with custom settings through two arguments: searcher_path and searcher. The current implementation uses searcher to specify the name of a YAML file within a folder (without including the .yaml extension) and searcher_path for the path to that folder. This approach does not align with the YAML usage for other arguments like pipeline_space and run_args, which link directly to a YAML file.

Possible Solutions:

searcher: "/path/to/searcher_config.yaml"

or we remove this usage completely, because the same functionality of 'searcher_config.yaml' exist already in 'run_args'

Neeratyoy commented 2 months ago

With the declarative interface, can we do,

searcher: "/path/to/searcher_config.yaml"
eta: 3

The equivalent call in Python code should be this right:

# `eta` is a searcher_kwarg in the yaml
neps.run(..., searcher=<path-to-searcher-config-yaml>, eta=3, ...)  

If so, then what is the blocker? If not, well, why not? 😅

Neeratyoy commented 2 months ago

@TarekAbouChakra and I chose that design when trying to manage the defaults for the searcher choice as strings We believe the design can be improved overall, to be more reflective of the actual class definition default arguments, and also to be transparent for research usage @TarekAbouChakra any thoughts/comments? @eddiebergman could perhaps also chip in perhaps regarding the design of the searcher path to yaml and kwargs to overwrite it

eddiebergman commented 2 months ago

I would have to see what the current state of things are to have a good opinion on this, I'd say get the easiest thing to work with the other PR first then come back to this

danrgll commented 2 months ago

@Neeratyoy @eddiebergman The current implementation for yaml follows the neps implementation:

For neps: neps.run(searcher="custom_searcher_file_name", searcher_path="/path/to/folder", eta=3)

For the Declarative this transitions currently to this, because I didn't wanted to introduce two different behaviours:

run_args:
      searcher: "custom_searcher_file_name"
      searcher_path: "/path/to/folder"
      searcher_kwargs:
               eta: 3

@Neeratyoy I also thinking about something like this:

run_args:
        searcher: "/path/to/searcher_config.yaml"
        eta: 3

and then align this for neps like you proposed.