exporter: document base-model file mirroring in module docstring - #249
Open
PeterLi-jpg wants to merge 1 commit into
Open
exporter: document base-model file mirroring in module docstring#249PeterLi-jpg wants to merge 1 commit into
PeterLi-jpg wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a "Base-model file mirroring" section to
scripts/export_tunix_lora_to_peft.pymodule docstring documenting why we copyconfig.json,generation_config.json, and the tokenizer set into the adapter dir after writing safetensors + adapter_config.Context
PR #247 implemented the actual file-copy logic (the
_BASE_FILES_TO_COPYtuple,copy_base_model_files, and the call site inwrite_peft_adapter). That PR documented the rationale in the function-level docstrings but not at the module level. This adds a top-of-file pointer so readers see the contract immediately.No code changes — pure docstring addition.
Verification
py_compile scripts/export_tunix_lora_to_peft.py-> OKpytest tests/ -x -q-> 191 passed, 1 skippedhuggingface_hub.snapshot_downloadagainst a fake snapshot dir, calledcopy_base_model_files, asserted present files copied + absent files skipped -> passes