Skip to content

docs: fix benchmark examples for Python 3.10 - #1802

Open
git-jxj wants to merge 1 commit into
modelscope:mainfrom
git-jxj:docs/fix-benchmark-example-python310
Open

git-jxj wants to merge 1 commit into
modelscope:mainfrom
git-jxj:docs/fix-benchmark-example-python310

Conversation

@git-jxj

@git-jxj git-jxj commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

The multiple-choice adapter example in the English and Chinese benchmark guides raises SyntaxError on Python 3.10 and 3.11 because its f-string expression contains a newline escape.

Use string concatenation for the options heading and joined options so the example works on the supported Python versions and produces the same prompt text.

Validation: both complete snippets compile on Python 3.10. The extracted formatter was exercised with real Sample objects across four cases per language, including empty and Unicode options, and matches the previous output on Python 3.13. make lint and the CI lite smoke test with the mock model pass.

This branch has not been deployed

No deployments
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