Skip to content

Cancel Fine-Tuning Job (OpenAI) v1.0.0

Cancels a fine-tuning job by ID.

How can I use the Step?

You can use the Step to terminate a fine-tuning job by ID immediately, which helps to fix potential mistakes and reduce unnecessary costs associated with model training. To learn more, read the Fine-tuning guide.

How does the Step work?

You authorize the Step and specify the fine-tuning job ID. Taking this input, the Step requests OpenAI Fine-Tunes API to cancel a fine-tuning job.

Prerequisites

To get started, you need an OpenAI API key. To retrieve an API key for your requests, visit your API Keys page.

Authorization

To authorize the Step, you have two options:

  • Inherit from previous Step (default): Use the same authorization as the previous Step in the Flow.
  • Select authorization in the current Step: Choose an existing authorization or create a new one.

In case you need to create a new authorization, follow these steps:

  1. Choose Select authorization in the current Step and then select Create a new authorization from the list.
  2. In the Add authorization modal window, provide the required details:
    • Authorization name: Name your new authorization.
    • API Key: Enter your OpenAI API key.
  3. Click Add to confirm settings and add your new authorization.

Request settings

From the Fine-tuning job ID list, select the job ID you want to cancel.

Merge field settings

The Step returns the result as a JSON object and stores it in the Merge field variable. Thus you can access the output JSON object from any point of your Flow.

Output example

The output depends on the development and the settings you provide. It contains details of the fine-tuning job and indicates whether it has been canceled.

To learn more, see the following output example:

json
{
  "id": "ft-xhrpBbvVUzYGo8oUO1FY4nI7",
  "object": "fine-tune",
  "model": "curie",
  "created_at": 1614807770,
  "events": [ { ... } ],
  "fine_tuned_model": null,
  "hyperparams": { ... },
  "organization_id": "org-...",
  "result_files": [],
  "status": "cancelled",
  "validation_files": [],
  "training_files": [
    {
      "id": "file-XGinujblHPwGLSztz8cPS8XY",
      "object": "file",
      "bytes": 1547276,
      "created_at": 1610062281,
      "filename": "my-data-train.jsonl",
      "purpose": "fine-tune-train"
    }
  ],
  "updated_at": 1614807789,
}
{
  "id": "ft-xhrpBbvVUzYGo8oUO1FY4nI7",
  "object": "fine-tune",
  "model": "curie",
  "created_at": 1614807770,
  "events": [ { ... } ],
  "fine_tuned_model": null,
  "hyperparams": { ... },
  "organization_id": "org-...",
  "result_files": [],
  "status": "cancelled",
  "validation_files": [],
  "training_files": [
    {
      "id": "file-XGinujblHPwGLSztz8cPS8XY",
      "object": "file",
      "bytes": 1547276,
      "created_at": 1610062281,
      "filename": "my-data-train.jsonl",
      "purpose": "fine-tune-train"
    }
  ],
  "updated_at": 1614807789,
}

Error Handling

By default, the Handle error toggle is on, and the Step handles errors with a separate exit. If any error occurs during the Step execution, the Flow proceeds down the error exit.

If the Handle error toggle is disabled, the Step does not handle errors. In this case, if any error occurs during the Step execution, the Flow fails immediately after exceeding the Flow timeout. To prevent the Flow from being suspended and continue handling errors, you can place the Flow Error Handling Step before the main logic or your Flow.

Reporting

The Step reports once after its execution. You can change the Step log level and add new tags in the section.

Log level

By default, the Step inherits its log level from Flow's log level. You can change the Step's log level by selecting an appropriate option from the Log level list.

Tags

Tags help organize and filter session information when generating reports. When adding a new tag, you can specify the tag category, label, and value.

Service dependencies

  • flow builder - v2.28.3
  • event-manager - v2.3.0
  • deployer - v2.6.0
  • library v2.11.3
  • studio v2.64.1

Release notes

v1.0.0

  • Initial release