Enum Class MLTaskState

java.lang.Object
java.lang.Enum<MLTaskState>
org.opensearch.ml.common.MLTaskState
All Implemented Interfaces:
Serializable, Comparable<MLTaskState>, Constable

public enum MLTaskState extends Enum<MLTaskState>
ML task states.
  • CREATED: When user send a machine-learning(ML) request(training/inference), we will create one task to track ML task execution and set its state as CREATED
  • RUNNING: Once MLTask is dispatched to work node and start to run corresponding ML algorithm, we will set the task state as RUNNING
  • COMPLETED: When all training/inference completed, we will set task state as COMPLETED
  • FAILED: If any exception happen, we will set task state as FAILED
  • Enum Constant Details

    • CREATED

      public static final MLTaskState CREATED
    • RUNNING

      public static final MLTaskState RUNNING
    • COMPLETED

      public static final MLTaskState COMPLETED
    • FAILED

      public static final MLTaskState FAILED
    • CANCELLED

      public static final MLTaskState CANCELLED
    • COMPLETED_WITH_ERROR

      public static final MLTaskState COMPLETED_WITH_ERROR
  • Method Details

    • values

      public static MLTaskState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MLTaskState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null