Configuring OliveSystem

This document describes how to configure the different types of OliveSystems

Local System

{
    "type": "LocalSystem",
    "config": {
        "device": "cpu"
    }
}

Please refer to LocalTargetUserConfig for more details on the config options.

AzureML System

Prerequisites

  1. azureml extra dependencies installed.

    pip install olive-ai[azureml]
    

    or

    pip install azure-ai-ml azure-identity
    

2. AzureML Workspace with necessary compute created. Refer to this for more details. Download the workspace config json.

3. AzureML authentication credentials. Refer to this for more details.

System Configuration

{
    "type": "AzureML",
    "config": {
        "aml_config_path": "olive-workspace-config.json",
        "aml_compute": "cpu-cluster",
        "aml_docker_config": {
            "base_image": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
            "conda_file_path": "conda.yaml"
        }
    }
}

Please refer to this example for "conda.yaml".

Important

The AzureML environment must have olive-ai installed!

Please refer to AzureMLTargetUserConfig for more details on the config options.

Docker System

Prerequisites

  1. Docker Engine installed on the host machine.

  2. docker extra dependencies installed.

    pip install olive-ai[docker]
    

    or

    pip install docker
    

System Configuration

{
    "type": "Docker",
    "config": {
        "local_docker_config": {
            "image_name": "olive",
            "build_context_path": "docker",
            "dockerfile": "Dockerfile"
        }
    }
}

Please refer to this example for "docker" and "Dockerfile".

Important

The docker container must have olive-ai installed!

Please refer to DockerTargetUserConfig for more details on the config options.

Python Environment System

{
    "type": "PythonEnvironment",
    "config": {
        "python_environment_path": "/home/user/.virtualenvs/myenv",
        "device": "cpu"
    }
}

Important

The python environment system can only be used to evaluate onnx models. It must have onnxruntime installed!

Please refer to PythonEnvironmentTargetUserConfig for more details on the config options.