Skip to content

docs: expand install guide and add minimal quick-start - #162

Merged
NandhaKishorM merged 1 commit into
NandhaKishorM:mainfrom
xiehuanyi:docs/117-118-install-and-quickstart
Oct 1, 2026
Merged

NandhaKishorM merged 1 commit into
NandhaKishorM:mainfrom
xiehuanyi:docs/117-118-install-and-quickstart

Conversation

@xiehuanyi

Copy link
Copy Markdown
Contributor

Closes #117, closes #118. README-only, additive (no existing lines changed).

#117 (installation):

#118 (usage examples):

  • 30-second minimal example (Router init -> predict -> read answer + routing).
  • Expected input/output explained (state shapes, choice/score/noul, routing metadata).
  • Pointer to laya.presets ready-made question sets.
  • Output shape verified against laya/agent.py (noul -> {type, noul, confidence, action}).

Copilot AI lite review requested due to automatic review settings September 22, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Correct the Windows activation commands, checkpoint size statement, and noul output documentation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Expands the README with installation guidance, troubleshooting notes, platform information, and a minimal Router quick-start.

Changes:

  • Adds virtual-environment and PyPI/source installation instructions.
  • Documents dependency, cache, memory, and Windows troubleshooting.
  • Explains Router usage, outputs, and routing metadata.
File Description
README.md Adds installation and quick-start documentation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md Outdated
Comment on lines +73 to +74
- First run downloads checkpoints from Hugging Face (`convaiinnovations/laya`, ~421M per checkpoint).
Set `HF_HUB_CACHE` to move the cache, or `HF_TOKEN` if you hit rate limits.
@NandhaKishorM

Copy link
Copy Markdown
Owner

Thank you for the quick start, the 30-second example is exactly what #118 asked for. Two facts changed today, so it needs a small refresh first. max_loaded now defaults to 2 (#180), not 1. And the Windows + Python 3.14 crash is very likely fixed by #195, pending confirmation in #123. #157 also landed today with install instructions, so could you trim the install part to what it doesn't already cover and keep the quick start? Then I'll merge it.

@xiehuanyi
xiehuanyi force-pushed the docs/117-118-install-and-quickstart branch from d251d56 to 76ac690 Compare September 30, 2026 08:48

@Bruce-Yii Bruce-Yii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of the conditions you set are met on this head, and the confirmation you were waiting on in #123 now exists — so this looks ready to merge.

max_loaded now defaults to 2. The added text says Router() keeps two checkpoints resident by default, which matches router.py:369 (max_loaded: int = 2) and the existing wording at README.md:463. No stale max_loaded=1 claim left anywhere in the addition.

Install stays trimmed, quick start kept. The diff adds zero lines to ## Installation or ## Installation details; the 37 added lines are three troubleshooting bullets (checkpoint cache, memory limits, Windows + Python 3.14) plus the ### Minimal example (30 seconds) block, inserted under ## Quickstart: Route Mode (Recommended) immediately before the existing full walkthrough. Nothing that #157 already covers is reintroduced. The only lines this shares verbatim with main are three code-fence markers and from laya import Router, which is just what two adjacent code blocks look like.

#123 is closed, so the 3.14 claim is confirmed rather than pending. You asked the reporter to try pip install -U laya without their patch. They verified on Windows 11 Pro 10.0.26200, Python 3.14.0, torch 2.14.0+cpu, no win_patch — all three checkpoints load and run, outputs bit-identical to 0.3.5 — and you closed the issue as fixed in 0.3.7. #195 is merged. The added paragraph describes that accurately, including crediting #195 rather than the docs.

The numbers check out. "about 421M parameters each; multilingual has about 322M" matches the table at README.md:118-120 exactly, and the hedge "download sizes also depend on weight precision and files" is the right hedge to attach to a parameter count in a download section.

Two wording nits, neither worth a round trip on its own:

  • "Upgrade older Laya installations with your environment's Python executable followed by -m pip install -U laya" is hard to parse. "using your environment's Python executable, run -m pip install -U laya" reads better and says the same thing.
  • The 30-second example uses Router() while the walkthrough directly below it uses Router(preload=True). That contrast is defensible and the new memory-limits bullet explains preload, but one clause noting the example takes the lazy path would stop a reader wondering whether the two disagree.

One thing that is not this PR's problem: it shows as blocked, which is a stale tests (py3.9) required check — ci.yml's matrix is 3.10 through 3.13, so no run on any current head produces that job. It needs a settings change, not a code change.

I did not execute the example, since that pulls checkpoints. The API shape matches the walkthrough below it, and Router.predict(state, questions) with a noul question is the documented form.

@NandhaKishorM
NandhaKishorM merged commit ed12fce into NandhaKishorM:main Oct 1, 2026
@NandhaKishorM

Copy link
Copy Markdown
Owner

Merged for 0.3.24. The refresh is exactly what I asked for and I checked each fact rather than taking the diff's word for it.

claim in the new text checked against
max_loaded=2 by default laya/router.py:518, max_loaded: int = 2
421M English and typed-decisions, 322M multilingual the checkpoint table at README:135-137
Windows + Python 3.14 fixed in 0.3.7 by #195 matches #123, and you kept it as a pointer rather than a promise
result["answers"]["billing"]["noul"] is P(true) ran it on the real english checkpoint: 0.916

The last one is the reason this is worth having. The 30-second example is the first code a new user runs, so a wrong key name there costs more than a whole page of prose being slightly stale, and the answer-dict explanation underneath (choice is the label, score is the expected level, noul is P(true), confidence is separate) is the distinction people get wrong most often.

Trimming the install section so it does not restate #157 was the right call too.

Closes #117 and #118. Thanks for coming back to it after main moved.

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.

Improve README usage examples Improve installation and setup documentation

4 participants