def initialize(self, log_to_file: bool = False, log_severity_level: int = 1):
        """Initialize engine state. This should be done before running the registered passes."""
        if log_to_file:
            enable_filelog(log_severity_level, self.cache.dirs.cache_dir, self.workflow_id)

        # set cache dir environment variables
        # might be used by other parts of olive to cache data
        self.cache.set_cache_env()

        # prepare non-local resources if host/target is not AzureML
        # TODO(anyone): Should the shared cache care about this? If so, the shared cache helper can
        # check for cached non-local resource paths and replace them with the original config
        # during hash calculation.
        if self.target_config.type != SystemType.AzureML:
            if self.evaluator_config:
                self.evaluator_config = self.cache.prepare_resources_for_local(self.evaluator_config)

            for passes_configs in self.input_passes_configs.values():
                for pass_config in passes_configs:
                    if pass_config.evaluator:
                        pass_config.evaluator = self.cache.prepare_resources_for_local(pass_config.evaluator)

        for passes_configs in self.input_passes_configs.values():
            for pass_config in passes_configs:
                host_type = pass_config.host.system_type if pass_config.host else self.host_config.type
                if host_type != SystemType.AzureML:
                    pass_config.config = self.cache.prepare_resources_for_local(pass_config.config)

        self._initialized = True
Initialize engine state. This should be done before running the registered passes.
olive/engine/engine.py