Skip to content

Commit

Permalink
ENG-10038: Use Union instead of Conditional Or For DownloadCheckpoint…
Browse files Browse the repository at this point in the history
…TypeChoice 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]>
  • Loading branch information
azahed98 and Arsh Zahed authored Aug 28, 2024
1 parent 5f504ed commit 469b723
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/together/cli/api/finetune.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from textwrap import wrap

Expand Down
2 changes: 1 addition & 1 deletion src/together/types/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class FinetuneResponse(BaseModel):
@field_validator("training_type")
@classmethod
def validate_training_type(cls, v: TrainingType) -> TrainingType:
if v.type == "Full":
if v.type == "Full" or v.type == "":
return FullTrainingType(**v.model_dump())
elif v.type == "Lora":
return LoRATrainingType(**v.model_dump())
Expand Down

0 comments on commit 469b723

Please sign in to comment.