import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.fineTuning.cancel({
fineTuningJobId: "ftjob_aa87e2b1112a455b8deabed784372198",
});
console.log(result);
}
run();{
"id": "ftjob_aa87e2b1112a455b8deabed784372198",
"object": "fine_tuning.job",
"created_at": 1704067200,
"model": "meetkai:functionary-medium",
"training_file": "file_abc123",
"validation_file": null,
"fine_tuned_model": null,
"organization_id": "org-123",
"status": "cancelled",
"result_files": [],
"seed": 42,
"hyperparameters": {
"n_epochs": 3,
"batch_size": "auto",
"learning_rate_multiplier": "auto"
},
"method": {
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 3
}
}
},
"finished_at": null,
"estimated_finish": null,
"trained_tokens": null,
"error": null,
"integrations": null,
"metadata": {
"experiment": "v1"
},
"suffix": "my-model"
}Immediately cancel a fine-tuning job.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.fineTuning.cancel({
fineTuningJobId: "ftjob_aa87e2b1112a455b8deabed784372198",
});
console.log(result);
}
run();{
"id": "ftjob_aa87e2b1112a455b8deabed784372198",
"object": "fine_tuning.job",
"created_at": 1704067200,
"model": "meetkai:functionary-medium",
"training_file": "file_abc123",
"validation_file": null,
"fine_tuned_model": null,
"organization_id": "org-123",
"status": "cancelled",
"result_files": [],
"seed": 42,
"hyperparameters": {
"n_epochs": 3,
"batch_size": "auto",
"learning_rate_multiplier": "auto"
},
"method": {
"type": "supervised",
"supervised": {
"hyperparameters": {
"n_epochs": 3
}
}
},
"finished_at": null,
"estimated_finish": null,
"trained_tokens": null,
"error": null,
"integrations": null,
"metadata": {
"experiment": "v1"
},
"suffix": "my-model"
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
OK
-9007199254740991 <= x <= 9007199254740991validating_files, queued, running, succeeded, failed, cancelled -9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Was this page helpful?