Skip to content

Accept strings for checkpoint type on download #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nbroad1881
Copy link
Contributor

Needs to check string value.

@mryab mryab requested a review from artek0chumak May 6, 2025 21:26
@nbroad1881
Copy link
Contributor Author

nbroad1881 commented May 6, 2025

Oh I see the confusion. I wanted to pass a string, but it's designed to take one of [DownloadCheckpointType.DEFAULT, DownloadCheckpointType.MERGED, DownloadCheckpointType.ADAPTER]

I think string makes the most sense (and matches the cli), but having it accept either might be easiest for users.

@mryab mryab changed the title add .value Accept strings for checkpoint type on download May 7, 2025
@nbroad1881
Copy link
Contributor Author

@mryab , @artek0chumak ,

What do you think of it now?

DownloadCheckpointType.MERGED,
DownloadCheckpointType.ADAPTER,
}:
url += f"&checkpoint={checkpoint_type.value}"
else:
raise ValueError(
f"Invalid checkpoint type for LoRATrainingType: {checkpoint_type}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this error will never be reached because of the check in lines 614:620, so we can delete this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants