Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperparameter sweep YAML with configurable search space ranges #3457

Open
CynthiaLuijkx opened this issue Dec 6, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@CynthiaLuijkx
Copy link

Describe your suggestion

I'd like an example of how to do a sweep job while specifying the search space range from the inputs parameters. The example currently available currently does not cover this, and I've been having problems getting it to work myself.

I'd like to see something like this:

$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: pipeline
display_name: pipeline_with_hyperparameter_sweep
description: Tune hyperparameters using TF component
settings:
    default_compute: azureml:cpu-cluster

inputs:
  c_value_min: 0.5
  c_value_max: 0.9

jobs:
  sweep_step:
    type: sweep
    inputs:
      data: 
        type: uri_file
        path: wasbs://[email protected]/iris.csv
      degree: 3
      gamma: "scale"
      shrinking: False
    outputs:
      model_output:
      test_data:
    sampling_algorithm: random
    trial: ./train.yml
    search_space:
      c_value:
        type: uniform
        min_value: ${{ parent.inputs.c_value_min }}
        max_value: ${{ parent.inputs.c_value_max }}
    objective:
      goal: minimize
      primary_metric: training_f1_score
    limits:
      max_total_trials: 5
      max_concurrent_trials: 3
      timeout: 7200

But then in a way that works; the method above unfortunately does not. The pipeline is submitted correctly, but in the sweep job itself the inputs provided are replaced with '0's as if they are missing. I have been unable to figure out the correct syntax to use here, or to find proper examples.

Additional details

No response

@CynthiaLuijkx CynthiaLuijkx added the enhancement New feature or request label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant