fix(build): strip \r\n from all .py files — CRLF breaks patch_ops.sh text matching

31 files had Windows line endings (\r\n) from merge commit. This causes
patch_ops.sh replace_once() to fail: anchor strings use \n but file
content has \r\n, so no match → patch fails → docker build fails.

Also added .gitattributes to force LF for all text files going forward.
This commit is contained in:
Claude
2026-08-14 01:06:49 +00:00
parent aa4b4992d1
commit 872be0effa
32 changed files with 13814 additions and 13804 deletions

View File

@@ -1,11 +1,11 @@
"""
Patches the vLLM model registry and deploys the Qwen3_5 model file.
Deploy steps on the remote machine:
1. patch_ops.sh locates vLLM with importlib.util.find_spec.
2. cp modified_scripts/qwen3_5.py into the detected vllm model directory.
2. python3 modified_scripts/patch_vllm_qwen3_5.py
The registry patch installs Qwen3.6 aliases so /model/config.json does not
need to be edited by hand.
"""
@@ -26,8 +26,8 @@ EXPECTED_REGISTRY_ENTRIES = (
'"Qwen3_6ForCausalLM": ("qwen3_5", "Qwen3_5ForCausalLM")',
'"Qwen3_6MoeForCausalLM": ("qwen3_5", "Qwen3_5MoeForCausalLM")',
)
def main():
print(f"=== Patching {REGISTRY} ===")
replace_once(
@@ -42,7 +42,7 @@ def main():
' "Qwen3_6MoeForCausalLM": ("qwen3_5", "Qwen3_5MoeForCausalLM"),',
required=True,
already_contains='"Qwen3_6MoeForCausalLM"')
print("\n=== Static verification ===")
model_source = MODEL.read_text(encoding="utf-8")
tree = ast.parse(model_source, filename=str(MODEL))
@@ -67,7 +67,7 @@ def main():
print(f" registry aliases verified: {len(EXPECTED_REGISTRY_ENTRIES)}")
print("\nDone. Registry aliases installed; do not edit /model/config.json.")
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()