question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

define step-size for parameter range

See original GitHub issue

When creating experiment, how do I go about creating a parameter with a range but with discrete intervals / step-size?

ax_client.create_experiment(
    name="hartmann_test_experiment",
    parameters=[
        {
            "name": "x1",
            "type": "range",
            "bounds": [10, 1000], # with step size 10
            "value_type": "int",
            "log_scale": False,
        },
       {
            "name": "x2",
            "type": "range",
            "bounds": [0, 1000], # with step size 20
            "value_type": "int",
            "log_scale": False,
        },
        ...

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
danielcohenlivecommented, Mar 23, 2022

Thanks for the question, @hududed! It looks like we don’t have that feature currently, but I can offer 2 workarounds:

  1. Use an integer range parameter and multiply the value by a constant on evaluation
  2. Use a choice parameter and set is_ordered to True Hope that helps!
0reactions
Balandatcommented, Mar 25, 2022

Use a choice parameter and set is_ordered to True

I would only recommend this if there are relatively few values and if the values are unevenly spaced. In all other cases you should use an integer parameter and scale things up to the right multiple on your end of the code. This will make it easier for Ax to build a good surrogate and optimize the problem well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamically control the Step Size in Parameter - Range - Idea
I'm working on a map based viz that uses user inputted parameter lat/long to draw range rings. I've set the lat/long parameters to...
Read more >
How to give step size as a range in python? - Stack Overflow
Here, I am diving the data in steps of 110. But, I would like to specify the step size as a range and...
Read more >
Stepsize Selection for Approximate Value Iteration and a New ...
Abstract. Approximate value iteration is used in dynamic programming when we use random ob- servations to estimate the value of being in a...
Read more >
Lecture 5: Gradient Desent Revisited 5.1 Choose step size
5.1.2 Backtracking line search. Adaptively choose the step size: First, fix a parameter 0 <β< 1, then at each iteration, start with t...
Read more >
Choose Step Size and Number of Iterations - MathWorks
The step size is parameterized (ts) so that you can make solver adjustments that decrease the likelihood of generating an overrun. For an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found