(fine_tuning)
Fine-tuning API
- list_jobs - List Fine Tuning Jobs
- create_job - Create Fine Tuning Job
- get_job - Get Fine Tuning Job
- cancel_job - Cancel Fine Tuning Job
Get a list of fine tuning jobs for your organization and user.
from beezy_ai import BeezyAI
import os
s = BeezyAI(
api_key_auth=os.getenv("API_KEY_AUTH", ""),
)
res = s.fine_tuning.list_jobs(page=0, page_size=100, model="<value>", status="<value>")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
page |
Optional[int] | ➖ | N/A |
page_size |
Optional[int] | ➖ | N/A |
model |
Optional[str] | ➖ | N/A |
status |
Optional[str] | ➖ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models.SDKError | 4xx-5xx | / |
Create a new fine tuning job, it will be queued for processing.
import beezy_ai
from beezy_ai import BeezyAI
import os
s = BeezyAI(
api_key_auth=os.getenv("API_KEY_AUTH", ""),
)
res = s.fine_tuning.create_job(model=beezy_ai.FineTuneableModel.OPEN_BEEZY_7B, training_files=[
"7b5e7c53-8567-44dd-9c16-3076f8a2e0e0",
], hyperparameters={
"training_steps": 518781,
}, validation_files=[
"fc99e9da-aed7-494f-953d-6c88158a4ffd",
], suffix="<value>", integrations=[
{
"project": "<value>",
"api_key": "<value>",
},
])
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
model |
models.FineTuneableModel | ✔️ | The name of the model to fine-tune. |
training_files |
List[str] | ✔️ | A list containing the IDs of uploaded files that contain training data. |
hyperparameters |
models.TrainingParameters | ✔️ | The fine-tuning hyperparameter settings used in a fine-tune job. |
validation_files |
List[str] | ➖ | A list containing the IDs of uploaded files that contain validation data. If you provide these files, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in checkpoints when getting the status of a running fine-tuning job. The same data should not be present in both train and validation files. |
suffix |
Optional[str] | ➖ | A string that will be added to your fine-tuning model name. For example, a suffix of "my-great-model" would produce a model name like ft:open-beezy-7b:my-great-model:xxx... |
integrations |
List[models.WandbIntegration] | ➖ | A list of integrations to enable for your fine-tuning job. |
Error Object | Status Code | Content Type |
---|---|---|
models.SDKError | 4xx-5xx | / |
Get a fine tuned job details by its UUID.
from beezy_ai import BeezyAI
import os
s = BeezyAI(
api_key_auth=os.getenv("API_KEY_AUTH", ""),
)
res = s.fine_tuning.get_job(job_id="257ef09d-0e69-4109-84ae-b8b7297792c1")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
job_id |
str | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models.SDKError | 4xx-5xx | / |
Request the cancellation of a fine tuning job.
from beezy_ai import BeezyAI
import os
s = BeezyAI(
api_key_auth=os.getenv("API_KEY_AUTH", ""),
)
res = s.fine_tuning.cancel_job(job_id="c740f53a-b6a1-4a6f-8d63-2a6b7561e7b3")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
job_id |
str | ✔️ | N/A |
Error Object | Status Code | Content Type |
---|---|---|
models.SDKError | 4xx-5xx | / |