nni icon indicating copy to clipboard operation
nni copied to clipboard

Transitioning from classic HPO to Retiarii experiments: file layout and setup advice needed

Open dtamienER opened this issue 8 months ago • 0 comments

I have successfully used NNI for classic HPO experiments, leveraging configurations such as those detailed below. My setup includes a search_space.json, config.yml, and a trial.py script:

  • search_space.json:
{
  "x": {
    "_type": "choice",
    "_value": [0, 1, 2]
  },
  "y": {
    "_type": "choice",
    "_value": [0, 1, 2]
  }
}
  • config.yml:
experimentName: "Hello, NNI!"
experimentWorkingDirectory: ./runs
searchSpaceFile: search_space.json
trainingService:
  platform: local
trialCodeDirectory: .
trialCommand: python3 trial.py
trialConcurrency: 3
tuner:
  name: GridSearch
  • trial.py:
import nni

def f(x, y):
    return x - y

def main(params):
    x, y = params['x'], params['y']
    result = f(x, y)
    nni.report_final_result(result)

if __name__ == "__main__":
    params = nni.get_next_parameter()
    main(params)

Now, I am interested in exploring the Retiarii block to conduct experiments that involve evolving neural network architectures. Could anyone provide guidance or share examples on how to set up the necessary files and configurations for a Retiarii experiment, especially with a config file aside?

dtamienER avatar Jun 04 '24 09:06 dtamienER