Skip to content

exporter: document base-model file mirroring in module docstring - #249

Open
PeterLi-jpg wants to merge 1 commit into
mainfrom
fix/exporter-module-docstring
Open

exporter: document base-model file mirroring in module docstring#249
PeterLi-jpg wants to merge 1 commit into
mainfrom
fix/exporter-module-docstring

Conversation

@PeterLi-jpg

Copy link
Copy Markdown
Owner

Summary

Adds a "Base-model file mirroring" section to scripts/export_tunix_lora_to_peft.py module docstring documenting why we copy config.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_COPY tuple, copy_base_model_files, and the call site in write_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 -> OK
  • pytest tests/ -x -q -> 191 passed, 1 skipped
  • Functional check: mocked huggingface_hub.snapshot_download against a fake snapshot dir, called copy_base_model_files, asserted present files copied + absent files skipped -> passes

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.

1 participant