[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BZN0MTGDFY7SRNKAD95KMQ":3,"skill-same:01M7BZN0MTGDFY7SRNKAD95KMQ":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7BZN0MTGDFY7SRNKAD95KMQ","nlp-research-repo-package-installment",null,"Reproduce NLP research repos by stabilizing the evaluator entrypoint, matching declared environments, and verifying tensor\u002Fhyperparameter semantics before implementing math-heavy objectives.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fsimpo-code-reproduction\u002Frepaired_skill\u002Fnlp-research-repo-package-installment\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nlp-research-repo-package-installment\nversion: \"1.3\"\ndescription: Reproduce NLP research repos by stabilizing the evaluator entrypoint, matching declared environments, and verifying tensor\u002Fhyperparameter semantics before implementing math-heavy objectives.\n---\n\n# NLP Research Repo Package Installment\n\nWhen reproducing an NLP research repo, align the environment to the repo’s declared dependencies first, and treat math-heavy code as an integration task: your “inputs” (tensors, hyperparameters) often have non-obvious semantics.\n\n## Workflow: choose the environment and install path\n\n1. Read dependency specs in this order: `environment.yml`\u002F`.yaml` → `requirements.txt` → `pyproject.toml`\u002F`setup.cfg`.\n2. Prefer the repo’s lock\u002Fpin strategy (conda env file, constraints file, pinned requirements) over ad‑hoc upgrades.\n3. Identify the evaluator entrypoint (test command \u002F script \u002F module) and run everything in a way that makes *that* entrypoint import correctly.\n4. Before changing anything, log the current interpreter and packages so you can diff: `python -VV`, `python -m pip --version`, `python -m pip freeze`.\n5. If Python major\u002Fminor mismatches the repo’s declared range, create a fresh environment that matches (venv\u002Fuv\u002Fconda).\n6. Install in the smallest steps that preserve reproducibility: base deps → repo\u002Fpackage install → optional extras.\n7. Gate deep debugging on an entrypoint smoke test: ensure the evaluator command runs far enough to import project modules without ad-hoc edits.\n8. After any run that claims to write an artifact (e.g., `*.npz`, `*.json`, checkpoints), immediately verify it exists and inspect keys\u002Fshapes\u002Fdtypes before iterating.\n\nRead references\u002Fevaluator_entrypoint_and_artifact_checks.md when the evaluator fails early with import\u002Fpath errors (e.g., `ModuleNotFoundError`) or when outputs are saved to disk and must be verified. Skip when the repo is already installed as a package and outputs are in-memory only.\n\n## Operation: create a matching Python environment (uv\u002Fvenv)\n\nUse this when the repo pins Python or when dependency resolution is brittle.\n\n```bash\npython -VV\npython -m venv .venv\n. .venv\u002Fbin\u002Factivate\npython -m pip install -U pip setuptools wheel\npython -m pip install -r requirements.txt\n```\n\nDecision rule: if installs fail with ABI\u002Fbuild errors (torch, tokenizers), switch to the repo’s intended Python version and\u002For a conda-based setup.\n\n## Operation: verify dependency semantics before implementing math-heavy code\n\nWhen re-implementing a paper’s objective inside a repo, verify that the tensors you consume (e.g., `*_logps`) and the hyperparameters you apply (e.g., margins, temperatures) have the same semantics\u002Funits as the paper *and* the repo.\n\nMinimum checks before you commit an algebra:\n\n1. **Repo-wide evidence:** search for the tensor\u002Fhparam name in configs, scripts, and docs; read surrounding comments\u002Fdocstrings and record intended units and typical numeric ranges.\n2. **Producer contract:** trace any ambiguous tensors (e.g., `*_logps`) back to the function that creates them and read its normalization\u002Fmasking contract.\n3. **Scale-placement disambiguation:** if a term could plausibly be inside vs outside a scale factor (e.g., `β*(Δ-γ\u002Fβ)` vs `β*Δ-γ`), enumerate the plausible forms and tie each to a concrete interpretation of the config value’s units.\n4. **Two-branch numeric check:** when ambiguity remains, compute a tiny batch both ways and check which branch matches any existing trainer\u002Ftests *or* matches the repo’s documented hparam ranges (the wrong branch often yields logits that are off by a constant factor).\n5. **Document the decision:** add an inline comment stating the chosen units (e.g., “`gamma` is in logit units; do not multiply by `beta`”) and avoid multiplying\u002Fdividing by `beta` unless the repo explicitly stores a ratio.\n\n```python\nimport re\nfrom pathlib import Path\n\nnames = [\"some_hparam_name\", \"some_tensor_name\"]\nfor name in names:\n    paths = [str(p) for p in Path(\".\").rglob(\"*.py\")\n             if re.search(rf\"\\b{re.escape(name)}\\b\", p.read_text(errors=\"ignore\"))]\n    print(name, \"hits:\", paths[:8])\n```\n\nDecision rule: if an input is ambiguous (sum vs mean, includes prompt tokens vs response-only, margin γ vs γ\u002Fβ), stop and determine its producer and units before writing equations.\n\nRead references\u002Flogp_tensor_semantics.md when implementing an objective that uses provided `*_logps`-like tensors and the paper uses length normalization (or masking). Skip when the `*_logps` producer is in the same file\u002Ffunction and its normalization is unambiguous.\n\nRead references\u002Fhparam_semantics_loss_scaling.md when implementing or modifying a loss\u002Fobjective and a config parameter’s meaning could be γ vs γ\u002Fβ (or inside vs outside a scale factor). Skip when the repo already has a tested reference function you can call directly.\n\n## Common Pitfalls\n\n- Installing packages before checking Python version pins (leads to unfixable ABI conflicts).\n- Mixing conda and pip installs without understanding which packages must come from which solver.\n- Upgrading core libraries (torch\u002Ftransformers) beyond the repo’s declared range to “fix” an import error.\n- Debugging model math before the evaluator entrypoint can import and run end-to-end.\n- Claiming an output artifact exists without immediately checking it on disk (path, keys, shapes, dtype).\n- Implementing a loss directly from the paper while assuming tensor semantics (e.g., `*_logps` sums vs per-token averages, mask conventions).\n- Implementing a loss\u002Fobjective without validating the repo’s hyperparameter semantics\u002Funits (terms placed inside vs outside scaling factors).\n","# NLP Research Repo Package Installment\n\nWhen reproducing an NLP research repo, align the environment to the repo’s declared dependencies first, and treat math-heavy code as an integration task: your “inputs” (tensors, hyperparameters) often have non-obvious semantics.\n\n## Workflow: choose the environment and install path\n\n1. Read dependency specs in this order: `environment.yml`\u002F`.yaml` → `requirements.txt` → `pyproject.toml`\u002F`setup.cfg`.\n2. Prefer the repo’s lock\u002Fpin strategy (conda env file, constraints file, pinned requirements) over ad‑hoc upgrades.\n3. Identify the evaluator entrypoint (test command \u002F script \u002F module) and run everything in a way that makes *that* entrypoint import correctly.\n4. Before changing anything, log the current interpreter and packages so you can diff: `python -VV`, `python -m pip --version`, `python -m pip freeze`.\n5. If Python major\u002Fminor mismatches the repo’s declared range, create a fresh environment that matches (venv\u002Fuv\u002Fconda).\n6. Install in the smallest steps that preserve reproducibility: base deps → repo\u002Fpackage install → optional extras.\n7. Gate deep debugging on an entrypoint smoke test: ensure the evaluator command runs far enough to import project modules without ad-hoc edits.\n8. After any run that claims to write an artifact (e.g., `*.npz`, `*.json`, checkpoints), immediately verify it exists and inspect keys\u002Fshapes\u002Fdtypes before iterating.\n\nRead references\u002Fevaluator_entrypoint_and_artifact_checks.md when the evaluator fails early with import\u002Fpath errors (e.g., `ModuleNotFoundError`) or when outputs are saved to disk and must be verified. Skip when the repo is already installed as a package and outputs are in-memory only.\n\n## Operation: create a matching Python environment (uv\u002Fvenv)\n\nUse this when the repo pins Python or when dependency resolution is brittle.\n\n```bash\npython -VV\npython -m venv .venv\n. .venv\u002Fbin\u002Factivate\npython -m pip install -U pip setuptools wheel\npython -m pip install -r requirements.txt\n```\n\nDecision rule: if installs fail with ABI\u002Fbuild errors (torch, tokenizers), switch to the repo’s intended Python version and\u002For a conda-based setup.\n\n## Operation: verify dependency semantics before implementing math-heavy code\n\nWhen re-implementing a paper’s objective inside a repo, verify that the tensors you consume (e.g., `*_logps`) and the hyperparameters you apply (e.g., margins, temperatures) have the same semantics\u002Funits as the paper *and* the repo.\n\nMinimum checks before you commit an algebra:\n\n1. **Repo-wide evidence:** search for the tensor\u002Fhparam name in configs, scripts, and docs; read surrounding comments\u002Fdocstrings and record intended units and typical numeric ranges.\n2. **Producer contract:** trace any ambiguous tensors (e.g., `*_logps`) back to the function that creates them and read its normalization\u002Fmasking contract.\n3. **Scale-placement disambiguation:** if a term could plausibly be inside vs outside a scale factor (e.g., `β*(Δ-γ\u002Fβ)` vs `β*Δ-γ`), enumerate the plausible forms and tie each to a concrete interpretation of the config value’s units.\n4. **Two-branch numeric check:** when ambiguity remains, compute a tiny batch both ways and check which branch matches any existing trainer\u002Ftests *or* matches the repo’s documented hparam ranges (the wrong branch often yields logits that are off by a constant factor).\n5. **Document the decision:** add an inline comment stating the chosen units (e.g., “`gamma` is in logit units; do not multiply by `beta`”) and avoid multiplying\u002Fdividing by `beta` unless the repo explicitly stores a ratio.\n\n```python\nimport re\nfrom pathlib import Path\n\nnames = [\"some_hparam_name\", \"some_tensor_name\"]\nfor name in names:\n    paths = [str(p) for p in Path(\".\").rglob(\"*.py\")\n             if re.search(rf\"\\b{re.escape(name)}\\b\", p.read_text(errors=\"ignore\"))]\n    print(name, \"hits:\", paths[:8])\n```\n\nDecision rule: if an input is ambiguous (sum vs mean, includes prompt tokens vs response-only, margin γ vs γ\u002Fβ), stop and determine its producer and units before writing equations.\n\nRead references\u002Flogp_tensor_semantics.md when implementing an objective that uses provided `*_logps`-like tensors and the paper uses length normalization (or masking). Skip when the `*_logps` producer is in the same file\u002Ffunction and its normalization is unambiguous.\n\nRead references\u002Fhparam_semantics_loss_scaling.md when implementing or modifying a loss\u002Fobjective and a config parameter’s meaning could be γ vs γ\u002Fβ (or inside vs outside a scale factor). Skip when the repo already has a tested reference function you can call directly.\n\n## Common Pitfalls\n\n- Installing packages before checking Python version pins (leads to unfixable ABI conflicts).\n- Mixing conda and pip installs without understanding which packages must come from which solver.\n- Upgrading core libraries (torch\u002Ftransformers) beyond the repo’s declared range to “fix” an import error.\n- Debugging model math before the evaluator entrypoint can import and run end-to-end.\n- Claiming an output artifact exists without immediately checking it on disk (path, keys, shapes, dtype).\n- Implementing a loss directly from the paper while assuming tensor semantics (e.g., `*_logps` sums vs per-token averages, mask conventions).\n- Implementing a loss\u002Fobjective without validating the repo’s hyperparameter semantics\u002Funits (terms placed inside vs outside scaling factors).\n",{"name":5,"version":24,"description":7},"1.3","main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fsimpo-code-reproduction\u002Frepaired_skill\u002Fnlp-research-repo-package-installment",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill nlp-research-repo-package-installment",{"tool":38,"command":39},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill nlp-research-repo-package-installment",{"tool":41,"command":42},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill nlp-research-repo-package-installment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fsimpo-code-reproduction\u002Frepaired_skill\u002Fnlp-research-repo-package-installment\u002FSKILL.md",true,[],[47,54,61,68,73,78],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":69,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":74,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":79,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]