Skip to content

Commit 0f9d6af

Browse files
authored
Merge pull request #7 from luminolabs/lum-712-updated-e2e-test
2 parents 589c1ca + 3097684 commit 0f9d6af

File tree

5 files changed

+369
-124
lines changed

5 files changed

+369
-124
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build/
1212
.idea/
1313
.vscode/
1414

15-
# This is the repopack genared file that
15+
# This is the repomix genared file that
1616
# contains the whole repo content for
1717
# submitting to AIs, like Claude
1818
lumino-sdk-python.txt

repopack.config.json renamed to repomix.config.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
"showLineNumbers": false,
99
"topFilesLength": 0
1010
},
11-
"include": ["**/*"],
11+
"include": [
12+
"**/*"
13+
],
1214
"ignore": {
1315
"useGitignore": true,
1416
"useDefaultPatterns": true
1517
}
16-
}
18+
}

src/lumino/fine_tuning.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,17 @@ async def cancel_fine_tuning_job(self, job_name: str) -> FineTuningJobDetailResp
102102
self.logger.info("Cancelling fine-tuning job: %s", job_name)
103103
data = await self._sdk._request("POST", f"/fine-tuning/{job_name}/cancel")
104104
return FineTuningJobDetailResponse(**data)
105+
106+
async def delete_fine_tuning_job(self, job_name: str) -> None:
107+
"""
108+
Delete a fine-tuning job.
109+
110+
Args:
111+
job_name (str): The name of the fine-tuning job to delete.
112+
113+
Raises:
114+
LuminoAPIError: If the API request fails.
115+
"""
116+
self.logger.info("Deleting fine-tuning job: %s", job_name)
117+
await self._sdk._request("DELETE", f"/fine-tuning/{job_name}")
118+
self.logger.info("Deleted fine-tuning job: %s", job_name)

src/lumino/models.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class FineTuningJobStatus(str, Enum):
3939
STOPPED = "STOPPED" # Job has been stopped by the user or system
4040
COMPLETED = "COMPLETED" # Job has completed successfully
4141
FAILED = "FAILED" # Job has failed to complete
42+
DELETED = "DELETED" # Job has been marked as deleted
4243

4344

4445
class FineTuningJobType(str, Enum):
@@ -79,16 +80,24 @@ class BillingTransactionType(str, Enum):
7980
STRIPE_CHECKOUT = "STRIPE_CHECKOUT"
8081

8182

82-
# Enumeration for compute providers
83+
class FineTunedModelStatus(str, Enum):
84+
"""Enum of possible fine-tuned model statuses."""
85+
ACTIVE = "ACTIVE"
86+
DELETED = "DELETED"
87+
88+
8389
class ComputeProvider(str, Enum):
90+
"""Enum of possible compute providers."""
8491
GCP = "GCP"
8592
LUM = "LUM"
8693

8794

8895
class BaseModel(_BaseModel):
8996
"""Base model for all models."""
97+
9098
def __repr__(self):
9199
return self.__str__()
100+
92101
def __str__(self):
93102
return self.model_dump_json(indent=2)
94103

@@ -269,7 +278,8 @@ class FineTuningJobDetailResponse(FineTuningJobResponse):
269278
"""
270279
parameters: Dict[str, Any] = Field(..., description="The parameters used for the fine-tuning job")
271280
metrics: Dict[str, Any] | None = Field(None, description="The metrics collected during the fine-tuning process")
272-
timestamps: Dict[str, Any] | None = Field(None, description="The timestamps recorded during the fine-tuning process")
281+
timestamps: Dict[str, Any] | None = Field(None,
282+
description="The timestamps recorded during the fine-tuning process")
273283
model_config = ConfigDict(from_attributes=True)
274284

275285

@@ -292,9 +302,12 @@ class FineTunedModelResponse(BaseModel):
292302
"""
293303
id: UUID = Field(..., description="The unique identifier of the fine-tuned model")
294304
created_at: DateTime = Field(..., description="The timestamp when the fine-tuned model was created")
305+
updated_at: DateTime = Field(..., description="The timestamp when the fine-tuned model was last updated")
295306
fine_tuning_job_name: str = Field(..., description="The name of the associated fine-tuning job")
307+
status: FineTunedModelStatus = Field(..., description="The current status of the fine-tuned model")
296308
name: str = Field(..., description="The name of the fine-tuned model")
297-
artifacts: Dict[str, Any] | None = Field(None, description="Additional artifacts associated with the fine-tuned model")
309+
artifacts: Dict[str, Any] | None = Field(None,
310+
description="Additional artifacts associated with the fine-tuned model")
298311
model_config = ConfigDict(from_attributes=True)
299312

300313

0 commit comments

Comments
 (0)