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

Parameter constraints not working in Loop API [ax-platform version 0.2.1 in pypi] #677

Closed
eycheu opened this issue Aug 25, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@eycheu
Copy link

eycheu commented Aug 25, 2021

Applies to ax-platform version 0.2.1 in pypi.

Parameter constraints not working in Loop API.

Argument parameter_constraints passed via optimize function and subsequently into OptimisationLoop.with_evaluation_function, is not passed into make_experiment function.

Original snippet of managed_loop.py

    @staticmethod
    def with_evaluation_function(
        parameters: List[TParameterRepresentation],
        evaluation_function: TEvaluationFunction,
        experiment_name: Optional[str] = None,
        objective_name: Optional[str] = None,
        minimize: bool = False,
        parameter_constraints: Optional[List[str]] = None,
        outcome_constraints: Optional[List[str]] = None,
        total_trials: int = 20,
        arms_per_trial: int = 1,
        wait_time: int = 0,
        random_seed: Optional[int] = None,
        generation_strategy: Optional[GenerationStrategy] = None,
    ) -> "OptimizationLoop":
        """Constructs a synchronous `OptimizationLoop` using an evaluation
        function."""
        experiment = make_experiment(
            name=experiment_name,
            parameters=parameters,
            objective_name=objective_name,
            minimize=minimize,
            outcome_constraints=outcome_constraints,
        )
        return OptimizationLoop(
            experiment=experiment,
            total_trials=total_trials,
            arms_per_trial=arms_per_trial,
            random_seed=random_seed,
            wait_time=wait_time,
            generation_strategy=generation_strategy,
            evaluation_function=evaluation_function,
        )```
@eycheu eycheu changed the title Parameter constraints not working in Loop API Parameter constraints not working in Loop API [ax-platform version 0.2.1 in pypi] Aug 25, 2021
@lena-kashtelyan lena-kashtelyan added the bug Something isn't working label Aug 25, 2021
@lena-kashtelyan
Copy link
Contributor

Thank you for reporting this, @eycheu! Let me merge this into #605.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants