-
Notifications
You must be signed in to change notification settings - Fork 450
rewrite ilab model convert #2950
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
Conversation
53d5547 to
80db436
Compare
80db436 to
96e6353
Compare
96e6353 to
4538552
Compare
4538552 to
5e42d48
Compare
5e42d48 to
ffd0233
Compare
ffd0233 to
8ea7eea
Compare
courtneypacheco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some questions about unit testing.
8ea7eea to
9d88715
Compare
nathan-weinberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor comments but otherwise LGTM
| Path(model), | ||
| Path(destination), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird to cast a Path when we are expecting a Path type in the first place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, for whatever reason click was still accepting it as a str even after i set the flag type as path
so i had to add this to make sure it actually was a path at all times
635380b to
2441cc7
Compare
Signed-off-by: Jaideep Rao <[email protected]> Signed-off-by: Charlie Doern <[email protected]>
| output_type: str = self.ftype.name.partition("_")[2] | ||
|
|
||
| # Filename Output | ||
| if self.fname_out.is_dir(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test is failing on this line. Apparently problem is we lost Path type of fname_out and intended. And somewhere variable was casted to String
|
|
||
| self.dir_model = dir_model | ||
| self.ftype = ftype | ||
| self.fname_out = fname_out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.fname_out = fname_out | |
| self.fname_out = Path(fname_out) |
To make code more robust and prevent similar error like described in https://github.com/instructlab/instructlab/pull/2950/files#r1975005755 . My theory is caller of constructor may provide String instead of Path for fname_out
|
This pull request has been automatically marked as stale because it has not had activity within 60 days. It will be automatically closed if no further activity occurs within 30 days. |
|
This pull request has merge conflicts that must be resolved before it can be merged. @jaideepr97 please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork |
|
AFAIU this work won't move forward, so closing. |
This PR redesigns
ilab model convertto work as a completely independent command. Previously it was only usable on macOS and performed additional steps such as adapter fusing etc. In this rewrite there are no assumptions made, and the command strictly performs only conversion operations, which allows us to use it on any platformat present only safetensors -> GGUF conversions are supported but the conversion mechanism has been made such that it is easily extensible for any new conversions to be added in the future
NOTE: the
llamacpp/convert_to_gguf.pyscript has been borrowed from llamacpp, and it replaces the old conversion script. As such, no code changes should be done thereIssue resolved by this Pull Request:
Resolves #2351
Checklist:
conventional commits.