Skip to content

Commit 469b723

Browse files
azahed98Arsh Zahed
andauthored
ENG-10038: Use Union instead of Conditional Or For DownloadCheckpointTypeChoice Typing (#177)
* Use Union instead of | * Add default case for training type as full * Swap from union to future annotations --------- Co-authored-by: Arsh Zahed <[email protected]>
1 parent 5f504ed commit 469b723

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/together/cli/api/finetune.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import json
24
from textwrap import wrap
35

src/together/types/finetune.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class FinetuneResponse(BaseModel):
230230
@field_validator("training_type")
231231
@classmethod
232232
def validate_training_type(cls, v: TrainingType) -> TrainingType:
233-
if v.type == "Full":
233+
if v.type == "Full" or v.type == "":
234234
return FullTrainingType(**v.model_dump())
235235
elif v.type == "Lora":
236236
return LoRATrainingType(**v.model_dump())

0 commit comments

Comments
 (0)