def _run_search(
        self,
        input_model_config: ModelConfig,
        input_model_id: str,
        accelerator_spec: "AcceleratorSpec",
        output_dir: Path,
    ):
        """Run all the registered Olive passes in search model where search strategy is not None."""
        # initialize the search strategy
        search_space_config = self._get_search_space_config(accelerator_spec)
        search_space_objectives = self._get_search_space_objectives(
            input_model_config, input_model_id, accelerator_spec
        )
        self.search_strategy.initialize(search_space_config, input_model_id, search_space_objectives)

        for sample in self.search_strategy:  # pylint: disable=not-an-iterable
            self._compute_search_pass_configs(accelerator_spec, sample)

            if self.computed_passes_configs:
                # get the model id of the first input model
                model_id = sample.model_ids[0]
                model_config = input_model_config if model_id == input_model_id else self._load_model(model_id)

                logger.info(
                    "Step %d with search point %s ...", self.search_strategy.iteration_count, sample.search_point
                )

                # run all the passes in the step
                should_prune, signal, model_ids = self._run_passes(model_config, model_id, accelerator_spec)
            else:
                should_prune, signal, model_ids = True, None, []

            # record feedback signal
            self.search_strategy.record_feedback_signal(sample.search_point.index, signal, model_ids, should_prune)

        return self.create_pareto_frontier_footprints(accelerator_spec, None, output_dir)
Run all the registered Olive passes in search model where search strategy is not None.
olive/engine/engine.py