Skip to content

docs(483): fix the install page floor, extras and verify steps - #593

Merged
sromoam merged 2 commits into
awslabs:devfrom
digalaviz:docs/483-install-python-floor-and-extras
Nov 19, 2026
Merged

sromoam merged 2 commits into
awslabs:devfrom
digalaviz:docs/483-install-python-floor-and-extras

Conversation

@digalaviz

@digalaviz digalaviz commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

tl;dr for humans

The install page said Python 3.12+, but the package supports 3.10 and later, and it left out three extras and the fact that BERT fetches a model. This fixes the Python floor on every page that repeated it, lists the missing extras, and keeps only the import check under Verify, since examples/ and tests/ are not in the wheel. No code or behavior changes.

Closes #483


for agents

  • intent: the "Done when" of Fix Installation: Python 3.10+ is supported, extras are missing, and the verify steps need a clone #483: the stated floor matches requires-python, every user-facing extra is on the page, every Verify command runs after a plain pip install.
  • behavior: docs only. pyproject.toml, src/ and tests are untouched.
  • code: docs/docs/Getting-Started/installation.md (floor, extras table, core comparator list, BERT note, Verify, Development Install now links to Development Setup); "3.12" replaced in README.md, CONTRIBUTING.md, docs/README.md, examples/README.md, Contributing/development-setup.md, Contributing/code-style.md, Contributing/testing-guide.md; CHANGELOG.md entry under Documentation. ruff.toml keeps py312 (tooling target).
  • commits: two docs(483) commits (the install page, then the BERT model name and the README reporting row), no semver impact.
  • verification: built the wheel from this branch and installed it as a non-root user in clean python:3.10 to 3.14 slim containers: import stickler works, Requires-Python is >=3.10, [all] installs without torch, transformers or evaluate, a plain install has no pandas and still writes the HTML report, the nine listed comparators import with no extra, examples/ and tests/ are not in the wheel. uv run python docs/check_links.py exits 0 (it tolerates the six known annotation warnings).
  • not covered: the semantic and llm rows were not run against AWS. The BERT note ("downloads roberta-large, about 1.4 GB, on first use") was corrected after review and comes from the pinned evaluate and bert-score source, not from a download here. Command quoting for zsh (Quote every pip extras command, and install optional comparators through their extras #482) is only fixed on the one line this PR adds.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Security Scan Results

ASH Security Scan Report

  • Report generated: 2026-11-18T17:14:46+00:00
  • Time since scan: 3 minutes

Scan Metadata

  • Project: ASH
  • Scan executed: 2026-11-18T17:11:40+00:00
  • ASH version: 3.1.2

Summary

Scanner Results

The table below shows findings by scanner, with status based on severity thresholds and dependencies:

  • Severity levels:
    • Suppressed (S): Findings that have been explicitly suppressed and don't affect scanner status
    • Critical (C): Highest severity findings that require immediate attention
    • High (H): Serious findings that should be addressed soon
    • Medium (M): Moderate risk findings
    • Low (L): Lower risk findings
    • Info (I): Informational findings with minimal risk
  • Duration (Time): Time taken by the scanner to complete its execution
  • Actionable: Number of findings at or above the threshold severity level that require attention
  • Result:
    • PASSED = No findings at or above threshold
    • FAILED = Findings at or above threshold
    • MISSING = Required dependencies not available
    • SKIPPED = Scanner explicitly disabled
    • ERROR = Scanner execution error
  • Threshold: The minimum severity level that will cause a scanner to fail
    • Thresholds: ALL, LOW, MEDIUM, HIGH, CRITICAL
    • Source: Values in parentheses indicate where the threshold is set:
      • global (global_settings section in the ASH_CONFIG used)
      • config (scanner config section in the ASH_CONFIG used)
      • scanner (default configuration in the plugin, if explicitly set)
  • Statistics calculation:
    • All statistics are calculated from the final aggregated SARIF report
    • Suppressed findings are counted separately and do not contribute to actionable findings
    • Scanner status is determined by comparing actionable findings to the threshold
Scanner Suppressed Critical High Medium Low Info Actionable Result Threshold
bandit 0 0 0 0 6826 0 0 PASSED MEDIUM (global)
cdk-nag 0 0 0 0 0 0 0 PASSED MEDIUM (global)
cfn-nag 0 0 0 0 0 0 0 MISSING MEDIUM (global)
checkov 0 0 0 0 0 0 0 PASSED MEDIUM (global)
detect-secrets 0 0 0 0 0 0 0 PASSED MEDIUM (global)
grype 0 0 0 0 0 0 0 MISSING MEDIUM (global)
npm-audit 0 0 0 0 0 0 0 PASSED MEDIUM (global)
opengrep 0 0 0 0 0 0 0 MISSING MEDIUM (global)
semgrep 3 0 0 0 0 0 0 PASSED MEDIUM (global)
syft 0 0 0 0 0 0 0 MISSING MEDIUM (global)

Report generated by Automated Security Helper (ASH) at 2026-11-18T17:14:46+00:00

- requires-python is >=3.10 and CI runs 3.10 to 3.14, so every
  "Python 3.12" mention now says 3.10 or later
- list the docsplit, reporting and all extras and what each needs
- name all nine core comparators, and say BERT fetches a model
- keep only the import check under Verify: examples/ and tests/ are
  not in the wheel
@digalaviz
digalaviz force-pushed the docs/483-install-python-floor-and-extras branch from 2e21b3e to b2e3946 Compare November 18, 2026 01:32

@vawsgit vawsgit 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.

needs changes

One medium finding, in an inline comment on docs/docs/Getting-Started/installation.md:42: the BERTComparator note names the wrong model. The fix is one line. Everything else in this PR checks out.

What I checked and cleared (head b2e3946, branch is current with dev at 6f76236):

  • Python floor 3.10 matches pyproject.toml requires-python = ">=3.10", the 3.10 to 3.14 classifiers, the run_pytest.yaml matrix, and the built wheel's Requires-Python. .python-version is 3.12, which matches the new development-setup note. No stale 3.11 or 3.12 floor is left in the Markdown files. Every page listed in #483 is fixed.
  • Extras: semantic, bert, llm, docsplit, reporting and all all exist in [project.optional-dependencies]. Leaving out confidence (an empty extra kept for old pins) and dev matches the table in #483.
  • "all is every extra except bert": installing [all] from the head wheel and from PyPI 1.0.1 on Python 3.10 gives pandas, boto3, strands, scipy and jinja2, with no torch, transformers or evaluate.
  • Verify step: python -c "import stickler; print('Stickler installed successfully')" prints the message after a plain install on Python 3.10.20. The import resolved to the temporary venv, not a checkout.
  • The 9 core comparators all import on a plain install with pandas, torch, boto3, strands and evaluate absent.
  • "HTML reports need no extra": with pandas absent, EvaluationHTMLReporter.generate_report wrote both a bulk report and a single-document report.
  • Docs build: docs/check_links.py exits 0 (only the 6 known griffe warnings). tests/test_docs_build.py passes (77 tests). The ../Contributing/development-setup/ link resolves.
  • Closes #483 is the right keyword once the inline finding is fixed.

Optional, not blocking:

  • README.md:28 (not changed here) says [reporting] gives "Confusion-matrix tables in HTML reports". That contradicts this PR's correct "HTML reports need no extra". Fixing it here would remove the contradiction.
  • Open PR #533 (quote pip extras installs for zsh) edits the same installation.md lines. Whichever PR merges second will have a merge conflict.

Not done: I did not install torch or download a real BERT model (more than 1.4 GB). The model finding comes from the pinned evaluate and bert-score source, plus the real bertscore metric script run with a stub bert_score.

### BERTComparator

Uses BERTScore for contextual similarity. Runs locally -- no cloud services needed.
Uses BERTScore for contextual similarity. Runs locally, but downloads `distilbert-base-uncased` from Hugging Face on first use.

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.

Medium: this note names the wrong model. BERTComparator downloads roberta-large (about 1.4 GB) on first use, not distilbert-base-uncased.

Why: bert.py line 12 passes model_type="distilbert-base-uncased" to evaluate.load(). In the locked evaluate 0.4.6, load() forwards it to EvaluationModule.__init__(**kwargs), which never uses it. Line 72 then calls model.compute(..., lang="en") with no model_type. The bertscore metric script then uses bert_score.utils.lang2model["en"], which is "roberta-large" in the locked bert-score 0.3.13.

Measured: running the real metric script through evaluate==0.4.6, with a stub bert_score that records its argument, called the way bert.py calls it:

model_type stored on module: None
model passed to bert_score: {'scorer': 'roberta-large'}

Why it matters: a person who prepares an offline machine by pre-downloading distilbert-base-uncased still gets a download of about 1.4 GB at the first comparison.

Fix: write "downloads a BERTScore model (roberta-large, about 1.4 GB) from Hugging Face on first use", or leave the model name out. The bert.py bug (model_type is ignored) is outside this PR. It is worth its own issue.

- the default is roberta-large, about 1.4 GB, not distilbert-base-uncased
- the README reporting row no longer says HTML reports need the extra
@digalaviz

Copy link
Copy Markdown
Contributor Author

pushed 7532819: the BERT note now names roberta-large (about 1.4 GB), and the README [reporting] row says HTML reports need no extra. all 11 checks pass. the model name comes from the pinned evaluate and bert-score source, not from a download here. could you re-review?

@vawsgit vawsgit 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.

✅ LGTM!

The medium finding from my earlier review is fixed, and so is the optional README note. I found no new medium or high problems. Checked at head 7532819.

Earlier finding: fixed. installation.md line 42 now says BERTComparator downloads roberta-large (about 1.4 GB).

  • Model name. I ran the real bertscore metric script through the locked evaluate 0.4.6. A stub bert_score loaded the real lang2model table from bert-score 0.3.13. Calling it the way bert.py does gave BERTScorer model_type: roberta-large. uv.lock still pins those versions.
  • Size. The Hugging Face file list for FacebookAI/roberta-large gives model.safetensors = 1,421,700,479 bytes. "About 1.4 GB" is correct.

Earlier optional note: fixed. README.md line 28 now says [reporting] is for passing a DataFrame as ProcessEvaluation.matrix, and that HTML reports need no extra. I checked this on Python 3.10 with the head wheel:

  • With pandas absent, EvaluationHTMLReporter.generate_report wrote a 16,067-byte report that includes the Confusion Matrix section.
  • With [reporting] installed, setting matrix to a DataFrame makes to_md() print a ## Confusion Matrix table.
  • Nothing in src/ imports pandas for reporting.

Also checked:

  • The new commit changes only these two lines.
  • The branch is 7 commits behind dev. Those commits are docs only, and git merge-tree reports a clean merge.
  • docs/check_links.py exits 0 on the head and on the merged tree. It shows only the 6 known griffe warnings.
  • tests/test_docs_build.py: 77 passed.
  • All 11 CI checks pass.
  • Closes #483 is the right keyword.

Optional, not blocking:

  • These pages still name distilbert-base-uncased, and now contradict the install page. This PR does not touch them:
    • docs/docs/Guides/Comparators/llm-as-a-judge.md lines 93, 114 and 137 (line 137 also says "~250 MB")
    • docs/docs/Guides/Comparators/README.md line 484
    • src/stickler/comparators/Comparators.md line 84
  • A follow-up issue could cover those pages and the bert.py bug: its model_type argument is ignored.
  • Open PR #533 still conflicts with this PR in installation.md. Whichever PR merges second must resolve the conflict.

Not done: I did not install torch or download roberta-large.

@sromoam
sromoam merged commit 1d8f27f into awslabs:dev Nov 19, 2026
11 checks passed
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.

Fix Installation: Python 3.10+ is supported, extras are missing, and the verify steps need a clone

3 participants