Coder Social home page Coder Social logo

Comments (2)

sdaulton avatar sdaulton commented on April 19, 2024 2

Hi @overshiki, you can specify that a RangeParameter is an integer using ParameterType.INT.. E.g. RangeParameter(name="x", parameter_type=ParameterType.INT, lower=1, upper=10). By default, Ax will apply an IntToFloat transform on generated candidates that basically does (1). You can see all the default transforms here. If you are generating batches of new candidates and you are using sequentially (greedy) selecting each point in the batch (the default in Ax), where each candidate in the batch is sequentially selected and subsequent candidates are conditioned upon the already selected points, then each new candidate is rounded before the successive conditioning to improve the optimization performance. The docs mention that you can use integer RangeParameters here, but I will add a better description as to the behavior.

from ax.

danielrjiang avatar danielrjiang commented on April 19, 2024 1

Also, you can see how the transformation / untransformation happens before and after a point is generated here, similar to how you describe in (1):

Ax/ax/modelbridge/base.py

Lines 491 to 522 in 951aa7b

# Transform
for t in self.transforms.values():
search_space = t.transform_search_space(search_space)
if optimization_config is not None:
optimization_config = t.transform_optimization_config(
optimization_config=optimization_config,
modelbridge=self,
fixed_features=fixed_features,
)
for metric, po in pending_observations.items():
pending_observations[metric] = t.transform_observation_features(po)
fixed_features = t.transform_observation_features([fixed_features])[0]
# Apply terminal transform and gen
observation_features, weights, best_obsf = self._gen(
n=n,
search_space=search_space,
optimization_config=optimization_config,
pending_observations=pending_observations,
fixed_features=fixed_features,
model_gen_options=model_gen_options,
)
# Apply reverse transforms
# pyre-fixme[6]: Expected `Sequence[_T]` for 1st param but got `ValuesView[Tr...
for t in reversed(self.transforms.values()): # noqa T484
observation_features = t.untransform_observation_features(
observation_features
)
if best_obsf is not None:
best_obsf = t.untransform_observation_features([best_obsf])[0]

from ax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.