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.

Changing a Range Parameter To Fixed

See original GitHub issue

At some point during my experiment, some of my integer parameters that were originally Range params converge to a single value. At that point, instead of trimming the range to two values, I create a new search space, replace those parameters in the search space with a single FixedParameter, then set the search space on the experiment. However, i then begin receiving this error:

https://github.com/facebook/Ax/blob/1febe3342896805bc9204c414a1d473cee15f485/ax/modelbridge/transforms/remove_fixed.py#L46

I’m curious why this happens. Here is an example:

My parameter, “source” converged to 3 and was replaced by a FixedParameter.

The params in the function are:

obsf.parameters: {'source': 2} 
self.fixed_parameters: { 'source': FixedParameter(name='source', parameter_type=INT, value=3)}

The error is:

Fixed parameter source with out of design value: 2 passed to RemoveFixed.

My only guess is that it is still generating values for the Fixed parameters because they used to be RangeParams, and the old experiment is being loaded from the database as a RangeParam.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
2timesjaycommented, Mar 9, 2021

@belotelov, @tonyhammainen

the solution using “fixed_features” in gen (see https://github.com/facebook/Ax/issues/383#issuecomment-692210541 ) should work once a recently landed fix in master is released. This should also give the desired behavior in terms of fitting the model to the full data but only generating points in the selected slice.

The fix is here: https://github.com/facebook/Ax/commit/f1d77592be5bb0fe42a5182299074e479bdcf780 It prevents overly aggressive filtering when new constraints are added mid-optimization.

An alternative before that release: run a trial manually with an arm that matches your fixed_features, then proceeding with the fixed_features kwarg in gen.

We generally don’t have good support for editing the types of parameters in a search space directly.

1reaction
lena-kashtelyancommented, May 19, 2021

@XRen615, yep the stable version is delayed a bit this time due to some pretty exciting updates we plan to publish with it : ) It should be coming towards the end of June.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stop excel from changing a range when you ... - YouTube
In this video, we will cover 2 examples of how to keep a range fixed while other range in the formulas can change....
Read more >
Rethinking Slider Parameter Formatting in Tableau - phData
Step #3: Build the parameter that will control the range parameter. Step #4: Parse the values from the parameter. Step #5: Set the...
Read more >
Creating a Dynamic Range “Parameter” in Tableau
What it looks like here is that I'm using a ranged “parameter” to change the mark color & shape whose set of possible...
Read more >
Keep up with dynamic data changes using dynamic parameters
Today, parameter values and their allowable values are fixed. As such, every time data changes, the parameter stays the same even though you...
Read more >
Set tuning parameter range a priori - Stack Overflow
The first way is to do it the way you are doing it, by pulling the needed parameters out of the workflow and...
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