Creating Jobs

Create a job to automate the detection of anomalies in Anomaly Detection.

  • Prerequisites:

    You must have a project that contains a trained model for use in an asynchronous anomaly detection job.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Anomaly Detection.
    2. In the left-side navigation menu, click Projects.
    3. Select the compartment that contains the project that you want to create a job in.
    4. Click the name of the project.

      The project details page opens.

    5. Under Details, click Jobs.
    6. Click Create job.
    7. (Optional) Enter a unique name (255 character limit) for the resource. If you don't provide a name, one is automatically generated.

      For example:

      aianomalydetection<resource>20230825155844

    8. (Optional) Enter a description (400 character limit) for the resource.
    9. Select the model that you want to run this job in.
    10. (Optional) Select the amount of sensitivity for the anomaly detection to use from 0 to 1.
    11. Select the input request type that you want to use for the job.
      • Inline:

        Drag a JSON or CSV file into the File box, or use Select file to locate and select it from a local drive.

      • Object store:

        Select the Object Storage bucket that contains the detection data file, and then select the file you that you want to use for this job. Only CSV files are supported.

        You can use multiple input buckets and detection data files by clicking Additional input bucket and making further selections.

    12. Select an Object Storage output bucket to store the output files in.

      The namespace shows you the tenancy that the job is being created in.

    13. (Optional) Enter a prefix to use to easily identify the results.

      For example, if myModel is the prefix, then the result file is myModel/results-file.json.

    14. Click Create job.

      The asynchronous job status is initially Accepted until the job starts running; then it's In Progress. When the job finishes the status changes to Succeeded. The time it takes to run the job depends on the size of the detection datasets.

    15. Click the completed asynchronous job to view its details and review the job results.

      The anomaly detection results file is saved in a separate folder in the selected Object Storage output bucket. The file name uses the <model-OCID>/<output_bucket_name> naming convention.

      • <model-OCID> is the OCID of the Anomaly Detection model.

      • <output_bucket_name> is the Object Storage bucket name.

      • The anomaly detection results file name is the same as the detection dataset file name suffixed with -results.

  • Use the oci anomaly-detection data-asset create commands and required parameters to create a job in a compartment:

    oci anomaly-detection detect-anomaly-job create --compartment-id <compartment-id>, -c [<name>] ... [OPTIONS]
    oci anomaly-detection detect-anomaly-job create-detect-anomaly-job-embedded-input-details --compartment-id <compartment-id>, -c [<name>] ... [OPTIONS]
    oci anomaly-detection detect-anomaly-job create-detect-anomaly-job-inline-input-details --compartment-id <compartment-id>, -c [<name>] ... [OPTIONS]
    oci anomaly-detection detect-anomaly-job create-detect-anomaly-job-object-list-input-details --compartment-id <compartment-id>, -c [<name>] ... [OPTIONS]
    oci anomaly-detection detect-anomaly-job create-detect-anomaly-job-object-store-output-details --compartment-id <compartment-id>, -c [<name>] ... [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the CreateDetectAnomalyJob operation to create a job.