def _evaluate_raw_latency(
        self,
        model: "ONNXModelHandler",
        metric: "Metric",
        dataloader: "Dataset",
        post_func=None,
        device: Device = Device.CPU,
        execution_providers: Union[str, list[str]] = None,
    ) -> list[float]:
        """For given repeat_test_num, return a list of latencies(ms)."""
        inference_config = self._get_common_config(model, metric, device, execution_providers)
        warmup_num, repeat_test_num, sleep_num = get_latency_config_from_metric(metric)
        inference_config.update(
            {
                "mode": "latency",
                "warmup_num": warmup_num,
                "repeat_test_num": repeat_test_num,
                "sleep_num": sleep_num,
            }
        )

        io_config = model.io_config

        with tempfile.TemporaryDirectory() as temp_dir:
            temp_dir_path = Path(temp_dir)
            # create input and output dir
            input_dir = temp_dir_path / "input"
            input_dir.mkdir(parents=True, exist_ok=True)
            output_dir = temp_dir_path / "output"
            output_dir.mkdir(parents=True, exist_ok=True)

            # save input data
            np.savez(input_dir / "input.npz", **format_data(next(iter(dataloader))[0], io_config))

            # save inference config
            config_path = temp_dir_path / "config.json"
            with config_path.open("w") as f:
                json.dump(inference_config, f)

            # run inference
            self._run_inference(
                config_path=config_path,
                model_path=model.model_path,
                input_dir=input_dir,
                output_dir=output_dir,
                external_initializers_path=model.external_initializers_path,
                constant_inputs_path=model.constant_inputs_path,
            )

            # load output
            return np.load(output_dir / "output.npy").tolist()
For given repeat_test_num, return a list of latencies(ms).
olive/systems/isolated_ort/isolated_ort_system.py