def __init__(
        self,
        service: _RemoteService,
        compiled_model_path: _Union[_Path, str],
        compute_units: _ComputeUnit,
        function_name: _Optional[str] = None,
        optimization_hints: _Optional[_Dict[str, _Any]] = None,
    ) -> None:
        """
        Initialize a RemoteMLModelService instance.

        Parameter
        ---------
        compiled_model_path: Path
            Path to the compiled model file.

        compute_units: ComputeUnit
            The compute units to be used for model execution.

        service: RemoteService
            The service used for communication with the remote device.
        """

        _RemoteMLModelService._validate_args(
            service=service,
            compiled_model_path=compiled_model_path,
            compute_units=compute_units,
            function_name=function_name,
            optimization_hints=optimization_hints,
        )

        if isinstance(compiled_model_path, str):
            compiled_model_path = _Path(compiled_model_path)

        self._compiled_model_path = compiled_model_path
        self._compute_units = compute_units
        self._model_id = str(_uuid.uuid4())
        self._service = service
        self._model_name = _os.path.basename(compiled_model_path)
        self._function_name = function_name
        self._optimization_hints = optimization_hints
        self._state = _RemoteMLModelService.State.Unloaded
        self._load_duration_in_nano_seconds = None
        self._last_predict_duration_in_nano_seconds = None

        Initialize a RemoteMLModelService instance.

        Parameter
        ---------
        compiled_model_path: Path
            Path to the compiled model file.

        compute_units: ComputeUnit
            The compute units to be used for model execution.

        service: RemoteService
            The service used for communication with the remote device.
        
coremltools/models/ml_program/experimental/remote_device.py