def set_failed(
        self,
        doc_id,
        result=None,
        progress=None,
        run_link=None,
        log_path=None,
        required_state=None,
    ):
        """Sets the given delegated operation to failed state.

        Args:
            doc_id: the ID of the delegated operation
            result (None): the
                :class:`fiftyone.operators.executor.ExecutionResult` of the
                operation
            progress (None): an optional
                :class:`fiftyone.operators.executor.ExecutionProgress` of the
                operation
            run_link (None): an optional link to orchestrator-specific
                information about the operation
            log_path (None): an optional path to the log file for the operation
            required_state (None): an optional
                :class:`fiftyone.operators.executor.ExecutionRunState` required
                state of the operation. If provided, the update will only be
                performed if the referenced operation matches this state.

        Returns:
            a :class:`fiftyone.factory.repos.DelegatedOperationDocument` if the
                update was performed, else ``None``.
        """
        return self._repo.update_run_state(
            _id=doc_id,
            run_state=ExecutionRunState.FAILED,
            result=result,
            run_link=run_link,
            log_path=log_path,
            progress=progress,
            required_state=required_state,
        )
Sets the given delegated operation to failed state.

        Args:
            doc_id: the ID of the delegated operation
            result (None): the
                :class:`fiftyone.operators.executor.ExecutionResult` of the
                operation
            progress (None): an optional
                :class:`fiftyone.operators.executor.ExecutionProgress` of the
                operation
            run_link (None): an optional link to orchestrator-specific
                information about the operation
            log_path (None): an optional path to the log file for the operation
            required_state (None): an optional
                :class:`fiftyone.operators.executor.ExecutionRunState` required
                state of the operation. If provided, the update will only be
                performed if the referenced operation matches this state.

        Returns:
            a :class:`fiftyone.factory.repos.DelegatedOperationDocument` if the
                update was performed, else ``None``.
        
fiftyone/operators/delegated.py