Coder Social home page Coder Social logo

Comments (2)

sdaulton avatar sdaulton commented on April 27, 2024

Hi @lsassen, Can you share your code including setting up AxClient and the GenerationStrategy for repro? Thanks!

from ax.

lsassen avatar lsassen commented on April 27, 2024

Hi @sdaulton. Here is how I set my AxClient:

  1. Set up the generation startegy:
gs = GenerationStrategy(
    steps=[
        GenerationStep(
            model=Models.BOTORCH_MODULAR,
            num_trials=-1,
            model_kwargs={
                "surrogate": Surrogate(FixedNoiseGP),
                "botorch_acqf_class": UpperConfidenceBound,
                "acquisition_options":  {"beta": 1.96**2,}
            },
        ),
    ]
)
  1. Set up the experiment
search_space = SearchSpace(parameters=[RangeParameter(name="x", parameter_type=ParameterType.FLOAT, lower=-10*np.pi, upper=10*np.pi)])

optimization_config = OptimizationConfig(objective=Objective(metric=Metric(name="f(x)",lower_is_better=False,),minimize=False,))

# Here, we have a dummy runner that does nothing.
class MyRunner(Runner):
    def run(self, trial):
        trial_metadata = {"name": str(trial.index)}
        return trial_metadata
    
experiment =Experiment(
        name="my first experiment",
        search_space=search_space,
        optimization_config=optimization_config,
        tracking_metrics=None,
        runner=MyRunner(),
        status_quo=None,
        description=None,
        is_test=False,
        experiment_type=None,
        properties=None,
        default_data_type=None,
    )
  1. Setup the Runner
ax_client = AxClient(
    generation_strategy=gs,
    verbose_logging=True,
    early_stopping_strategy=None,
)
ax_client._set_experiment(
    experiment=experiment, overwrite_existing_experiment=True
)

I am using ax-platform==0.3.5 version. If you need more input from my side to provide feedback please let me know.
Thanks you

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.