Class

MLTask

An abstract base class for machine learning tasks.

Declaration

class MLTask : NSObject

Overview

You don’t create use this class directly. Instead, use a class that inherits from this one, such as MLUpdateTask.

Topics

Identifying a Task

var taskIdentifier: String

A unique name of the task to distinguish it from all other tasks at runtime.

Starting and Stopping a Task

func resume()

Begins or resumes a machine learning task.

func cancel()

Cancels a machine learning task before it completes.

Checking the State of a Task

var state: MLTaskState

The current state of the machine learning task.

enum MLTaskState

The state of a machine learning task.

var error: Error?

The underlying error if the task is in a failed state.

Relationships

Inherits From

Conforms To