Repository navigation
fix(cli): leave adapter directory untouched on intrinsic upload - #1857
Conversation
`m alora upload --intrinsic` staged by editing the source directory in place: io.yaml was copied into it and its README.md was deleted before copying to the staging directory. A user-written model card was silently destroyed by the upload. Stage without modifying the source instead: copytree the weight directory while ignoring README.md, then copy io.yaml into the staged copy. Fixes generative-computing#1812 Assisted-by: Devin Signed-off-by: Seyamalam <[email protected]>
spzala
left a comment
There was a problem hiding this comment.
Thanks @Seyamalam
I have verified the output (that README was not removed as desired) with the fix and it lgtm but will wait for review from @planetf1
|
@Seyamalam thanks, and one thing we should have caught earlier. #1814 fixes the same issue and was opened a week before this; I reviewed yours without noticing the overlap. Our error. The two fixes are equivalent, so I'd like to merge this one for the code change: your base is current main and spzala has already verified the output. #1814 has a few extra tests (contents, a local |
planetf1
left a comment
There was a problem hiding this comment.
Thanks @Seyamalam. Staging now leaves the source directory untouched, and the new test checks both the staged contents and that the original README.md survives. CI is green on this head.
7cb4fa1
Pull Request
Thanks for sending a pull request! Please make sure you read the contributing guidelines.
Issue
Fixes #1812
Description
m alora upload --intrinsicstaged its upload by editing the user's adapter directory in place: it copiedio.yamlinto the weight directory and deleted itsREADME.mdbefore runningcopytreeinto the staging directory. The upload succeeded silently, so a hand-written model card was destroyed with no warning.Staging now leaves the source untouched:
copytreeignoresREADME.mdwhen populating the staging directory andio.yamlis copied into the staged copy — the same layout as before, without mutating the source.Testing
Attribution
Adding a new component, requirement, sampling strategy, or tool?
If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.
NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.