docs: document Spark 4 install coordinates - #2660
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Hey Rana Singh (@ranadeepsingh) 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
## Summary Add a runtime, Scala, Python baseline, release tag, and Maven coordinate matrix for Spark 3.5, 4.0, and 4.1. Update current and 1.1.3-versioned installation surfaces, clarify that the Python wheel does not load JVM classes, and add deterministic documentation regression coverage. ## Prompting Intent Resolve GitHub issue microsoft#2402 end to end by making the published Scala 2.13 Spark 4.0 and Spark 4.1 artifacts discoverable and copy-paste installable without changing workflows, pipelines, dependency pins, or generated target files. Preserve master-first, port-safe documentation and verify live tags and artifacts. ## Linked Sources - GitHub issue microsoft#2402: microsoft#2402 - Spark 4.0 tag: https://github.com/microsoft/SynapseML/tree/v1.1.3-spark4.0 - Spark 4.1 tag: https://github.com/microsoft/SynapseML/tree/v1.1.3-spark4.1 - Spark 4.0 aggregate POM: https://mmlspark.blob.core.windows.net/maven/com/microsoft/azure/synapseml_2.13/1.1.3-spark4.0/synapseml_2.13-1.1.3-spark4.0.pom - Spark 4.1 aggregate POM: https://mmlspark.blob.core.windows.net/maven/com/microsoft/azure/synapseml_2.13/1.1.3-spark4.1/synapseml_2.13-1.1.3-spark4.1.pom ## Rationale Use the existing SYNAPSEML_VERSION substitution pattern and compose Spark port suffixes from it so future release bumps do not need duplicated literal versions. Keep the compatibility matrix in the README, canonical install guide, and current versioned docs, while specialized guides link back to that source of truth. A non-network Node test guards the matrix, resolver, failure explanation, and stale Scala 2.12 guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b3c4d6b to
e0d4cd3
Compare
## Summary Update the website landing page, complete all Python runtime variants, scope the Isolation Forest notebook honestly to Spark 3.5, and lock explicitly published Spark port metadata for deterministic documentation checks. ## Prompting Intent Address the four concrete blockers found in the review of PR microsoft#2660 without changing workflows, dependency pins, or Azure pipeline state. Keep the change port-safe, verify published Spark 4 artifacts, preserve the existing version-bump mechanism, and prevent documentation tests from inventing unpublished port coordinates. ## Linked Sources - GitHub issue: microsoft#2402 - Pull request review: microsoft#2660 ## Rationale Centralized landing-page coordinates while keeping an explicit publication lock separate from the base release version. This lets normal release tooling update current-version surfaces but makes tests fail until Spark port tags are deliberately confirmed. The Isolation Forest quickstart remains on its compatible pinned dependency baseline rather than claiming unverified Python 3.12/3.13 support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR updates SynapseML installation documentation and the website landing page to clearly document Spark 3.5 vs Spark 4.0/4.1 artifact coordinates (Scala 2.12 vs 2.13), and adds a deterministic website test that locks published Spark-port metadata against tagged sources.
Changes:
- Added a Spark runtime / Scala / Python baseline / release tag / Maven coordinate matrix to README + install guides, clarifying that the PyPI wheel doesn’t load JVM artifacts.
- Centralized website install coordinates into
website/src/installArtifacts.jsand updated the landing page to render all supported runtime variants. - Added
website/test/installDocs.test.jsplus apublished-spark-ports.lockfile to prevent docs/website from advertising unpublished Spark ports.
Show a summary per file
| File | Description |
|---|---|
| website/versioned_docs/version-1.1.3/Reference/R Setup.md | Adds Spark 3.5 vs Spark 4 coordinate guidance and points to the install matrix. |
| website/versioned_docs/version-1.1.3/Overview.md | Replaces blanket “requires Scala 2.12” with Spark/Scala-specific artifact guidance. |
| website/versioned_docs/version-1.1.3/Get Started/Install SynapseML.md | Adds install matrix and expanded cross-Spark install examples (Python, SBT, --packages). |
| website/versioned_docs/version-1.1.3/Explore Algorithms/Deep Learning/Getting Started.md | Clarifies wheel vs JVM artifact responsibilities and links to the install matrix. |
| website/versioned_docs/version-1.1.3/Explore Algorithms/Anomaly Detection/Quickstart - Isolation Forests.md | Explicitly scopes the quickstart to Spark 3.5 / Scala 2.12 and pins the coordinate. |
| website/test/published-spark-ports.lock | Introduces a locked record of published Spark 4 port tags/coordinates/baselines. |
| website/test/installDocs.test.js | Adds non-network regression tests ensuring docs/website match the locked port metadata and tagged sources. |
| website/src/pages/index.js | Updates landing page copy and snippets; renders a runtime matrix using centralized coordinates. |
| website/src/installArtifacts.js | Adds a central definition of repository + Spark 3.5/4.0/4.1 coordinates and Python baselines. |
| README.md | Adds install matrix + clarifies wrapper vs JVM artifact and Spark 4 Scala 2.13 requirements. |
| docs/Reference/R Setup.md | Adds Spark 3.5 vs Spark 4 coordinate guidance and links to install matrix. |
| docs/Overview.md | Replaces blanket “requires Scala 2.12” with Spark/Scala-specific artifact guidance. |
| docs/Get Started/Install SynapseML.md | Adds install matrix and expanded cross-Spark install examples (Python, SBT, --packages). |
| docs/Explore Algorithms/Deep Learning/ONNX.md | Replaces hardcoded Scala 2.12 coordinates with runtime-aware placeholders and install-matrix guidance. |
| docs/Explore Algorithms/Deep Learning/Getting Started.md | Clarifies wheel vs JVM artifact responsibilities and links to install matrix. |
| docs/Explore Algorithms/Anomaly Detection/Quickstart - Isolation Forests.ipynb | Updates prerequisites + pins the Spark 3.5 / Scala 2.12 coordinate in the notebook. |
Review details
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 15/16 changed files
- Comments generated: 2
- Review effort level: Lite
## Summary Remove invalid paragraph nesting from the website landing page and make ONNX GPU installation examples use explicit deep-learning module coordinates for Spark 3.5, 4.0, and 4.1. ## Prompting Intent Address the two exact-head Copilot findings on PR microsoft#2660, add deterministic regression coverage, validate the published module coordinates, and preserve the existing release-version mechanism without triggering Azure Pipelines. ## Linked Sources - GitHub issue: microsoft#2402 - Invalid DOM review thread: microsoft#2660 (comment) - ONNX coordinate review thread: microsoft#2660 (comment) ## Rationale Use div containers for block-level landing-page content so paragraphs and code snippets remain valid siblings. Document the narrower synapseml-deep-learning module rather than an ambiguous aggregate placeholder, while retaining the aggregate as an explicit alternative and deriving all runtime-specific versions from the current base release. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
docs/Explore Algorithms/Deep Learning/Getting Started.md:29
- This page now frames the sample as using a generic “Spark 3 / Scala 2.12” runtime, but the repo’s current build baseline is Spark 3.5 (see build.sbt’s sparkVersion). Given this doc also references a specific Databricks runtime in the note above, consider updating this sentence to explicitly state the supported Spark minor line (e.g., Spark 3.5 / Scala 2.12) or clarify that the sample is for an older Spark 3.x runtime and may not be compatible with the current artifacts.
The Python wheel supplies wrappers but does not install the JVM package. This
sample uses a Spark 3 / Scala 2.12 runtime, so add the following Maven library:
website/src/installArtifacts.js:3
- Deriving
versionby splittingpythonPackageis unnecessarily brittle (it silently yieldsundefinedif the string format changes). Consider makingversionthe single source of truth (e.g.,const version = "1.1.3"; const pythonPackage =synapseml==${version};) so the coordinate construction can’t desynchronize from the package string.
const pythonPackage = "synapseml==1.1.3";
const version = pythonPackage.split("==")[1];
const repository = "https://mmlspark.blob.core.windows.net/maven";
website/test/installDocs.test.js:19
currentVersionis extracted fromdocusaurus.config.jsvia a regex that assumes an exactlet version = "..."spelling. This is fragile (e.g., changing it toconstor single quotes will break tests even if the version is unchanged). Consider reading the version fromversions.json(already parsed) or importing/awaiting the config’s exported function and readingcustomFields.version, so the test tracks the actual config structure rather than its textual formatting.
const config = fs.readFileSync(
path.join(repoRoot, 'website', 'docusaurus.config.js'),
'utf8',
);
const currentVersion = config.match(/let version = "([0-9.]+)"/)?.[1];
const publishedVersions = JSON.parse(
fs.readFileSync(path.join(repoRoot, 'website', 'versions.json'), 'utf8'),
);
- Files reviewed: 15/16 changed files
- Comments generated: 1
- Review effort level: Lite
## Summary Make the ONNX shell example copy-paste safe, clarify the deep-learning Spark 3.5 baseline in canonical and versioned docs, and harden website version metadata/test discovery. ## Prompting Intent Address the current-head Copilot thread and all suppressed findings on PR microsoft#2660, including shell-safe coordinate selection, explicit Spark minor compatibility, fail-fast package-pin parsing, and version discovery that does not depend on Docusaurus config spelling. Preserve version-bump compatibility and do not trigger Azure Pipelines. ## Linked Sources - GitHub issue: microsoft#2402 - Shell placeholder review thread: microsoft#2660 (comment) - Exact-head review: microsoft#2660 (review) ## Rationale Use a concrete environment variable in the bash example so angle-bracket placeholders cannot become shell redirection. Keep `synapseml==1.1.3` as the release-script anchor while validating its prefix before deriving coordinates, and use the first published documentation version rather than parsing JavaScript source text. Mirror compatibility wording into the current versioned guide. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed all three suppressed findings from the
Validation: website tests 30/30, changed Deep Learning MDX compilation passed, metadata/JSX syntax and |
There was a problem hiding this comment.
Review details
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
website/src/pages/index.js:306
- The Synapse (Spark 3.5 pools) snippet hard-codes the SynapseML coordinate as
com.microsoft.azure:synapseml_2.12:1.1.3even though this page now centralizes install coordinates viainstallArtifacts. This can drift on future base-version bumps and defeats the goal of a single source of truth. Consider interpolatingspark35.coordinate(or aspark35-derived variable) in this snippet the same way Fabric/Spark Packages/Python do.
<p>SynapseML can be installed on Synapse adding the following to the first cell of a notebook:</p>
For Spark3.5 pools:
<CodeSnippet
snippet={`%%configure -f
{
"name": "synapseml",
"conf": {
"spark.jars.packages": "com.microsoft.azure:synapseml_2.12:1.1.3",
"spark.jars.repositories": "${repository}",
website/test/installDocs.test.js:131
new RegExp(installArtifacts.repository)treats characters like.as regex wildcards, so this assertion can pass even if the docs contain a malformed repository URL. Consider escaping the repository string before constructing the regex (e.g., via a smallescapeRegExphelper) so the test requires an exact literal match.
This issue also appears on line 222 of the same file.
);
assert.match(markdown, /--repositories "\$SYNAPSEML_REPOSITORY"/);
assert.match(markdown, new RegExp(installArtifacts.repository));
assert.doesNotMatch(markdown, /mmlspark\.azureedge\.net/);
website/test/installDocs.test.js:225
- Same issue as above:
assert.match(onnx, new RegExp(installArtifacts.repository))does not escape regex metacharacters in the repository URL, which weakens the assertion. Escaping the string (or using a plain substring check) would make this regression test reliably detect repository drift.
);
}
assert.match(onnx, new RegExp(installArtifacts.repository));
assert.match(rSetup, /examples below use Spark 3\.5 \/ Scala 2\.12/);
- Files reviewed: 15/16 changed files
- Comments generated: 0 new
- Review effort level: Lite
## Summary Use the centralized Spark 3.5 coordinate in the Synapse landing-page snippet and make repository assertions require the exact literal URL. ## Prompting Intent Address every suppressed finding from the exact-head Copilot review of PR microsoft#2660, prevent future version drift in the primary website surface, strengthen deterministic documentation tests, and leave Azure Pipelines untouched. ## Linked Sources - GitHub issue: microsoft#2402 - Pull request: microsoft#2660 ## Rationale Interpolate `spark35.coordinate` so the landing page has one source of truth for supported runtime artifacts. Use direct substring checks for a fixed repository URL rather than an unescaped regular expression whose metacharacters could admit malformed values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed every suppressed finding from the
Evidence: website tests 30/30, JSX/test syntax and |
There was a problem hiding this comment.
Review details
Suppressed comments (5)
Previously missed (5) — in code that hasn't changed since the last review.
docs/Get Started/Install SynapseML.md:121
- This section instructs users to install a single runtime variant, but the bash snippet immediately below lists three different
pysparkversion ranges. This makes it easy to run all commands and unintentionally replace the intended PySpark version. Consider restructuring to present mutually exclusive options (separate code blocks, tabs, or an explicit “choose one” block with only one command active).
To try out SynapseML on a Python (or Conda) installation, you can get Spark
installed via pip. Install the Python wrapper and PySpark version for one
complete runtime variant, then start Spark with that variant's JVM artifact:
```bash
README.md:234
- The text says to install PySpark/SynapseML for “one complete runtime variant”, but the following bash block lists three different
pysparkpins. A copy/paste user may run all three and end up with the last-installed PySpark version, which contradicts the intent. Consider splitting into three separate code blocks (or adding an explicit “choose exactly one” heading plus commenting-out the non-selected commands).
Install the Python wrapper and PySpark version for one complete runtime variant,
then start Spark with that variant's JVM artifact:
```bash
SYNAPSEML_VERSION=1.1.3
website/versioned_docs/version-1.1.3/Get Started/Install SynapseML.md:121
- This section says to install one runtime variant, but the bash snippet that follows includes three different
pysparkpins. Users may run all three and end up with a mismatched PySpark/JVM artifact pairing. Consider presenting the runtime variants as mutually exclusive choices (separate code blocks, tabs, or an explicit “choose one” instruction).
To try out SynapseML on a Python (or Conda) installation, you can get Spark
installed via pip. Install the Python wrapper and PySpark version for one
complete runtime variant, then start Spark with that variant's JVM artifact:
```bash
website/src/pages/index.js:460
- The Python install snippet lists three different
pysparkversion specs in a single block. Since these are mutually exclusive runtime variants, users may run them sequentially and silently end up with only the last-installed PySpark version. Consider adding a clear “choose one” note or splitting into per-runtime blocks so copy/paste yields a single consistent setup.
Install both the Python wrapper and the PySpark version
matching the selected JVM artifact.
<CodeSnippet
snippet={`# Spark 4.1 / Python ${spark41.pythonBaseline}
python -m pip install "${spark41.pythonPackage}" "pyspark${spark41.pysparkSpec}"
website/src/pages/index.js:491
- This code snippet is Scala (
libraryDependencies += ...) but theCodeSnippetlanguage is set tojsx, which will apply incorrect syntax highlighting. Setlangtoscala(or omit it if CodeSnippet auto-detects).
snippet={`resolvers += "SynapseML" at "${repository}"
// Spark 4.1; use "${spark40.coordinate}" for Spark 4.0.
libraryDependencies +=
"com.microsoft.azure" % "synapseml_2.13" % "${spark41.coordinate.split(":")[2]}"
// Spark 3.5:
// libraryDependencies +=
// "com.microsoft.azure" % "synapseml_2.12" % "${spark35.coordinate.split(":")[2]}"`}
lang="jsx"
></CodeSnippet>
- Files reviewed: 15/16 changed files
- Comments generated: 0 new
- Review effort level: Lite
## Summary Split Python installation commands into mutually exclusive runtime examples and correct Scala syntax highlighting on the website landing page. ## Prompting Intent Address every suppressed finding from the exact-head Copilot review of PR microsoft#2660, ensuring users cannot accidentally install three incompatible PySpark ranges and keeping README, canonical docs, versioned docs, and the landing page consistent. Do not trigger Azure Pipelines. ## Linked Sources - GitHub issue: microsoft#2402 - Pull request exact-head review: microsoft#2660 ## Rationale Separate code blocks make each Python/PySpark pair independently copy-pasteable and remove the risk that users execute all mutually exclusive commands. The landing page mirrors this structure with three snippets, while the sbt example now uses Scala highlighting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
## Summary`nRaise the documented Spark 4.0 PySpark lower bound from 4.0.0 to 4.0.1 across centralized metadata and installation guides, with a regression assertion that preserves the compatible floor. ## Prompting Intent`nValidate every advertised SynapseML install command in a real runtime, keep installation choices intuitive, and correct any incompatibility discovered before declaring PR microsoft#2660 ready. ## Linked Sources`n- GitHub issue: https://github.com/microsoft/SynapseML/issues/2402`n- Pull request: https://github.com/microsoft/SynapseML/pull/2660`n- Published POM: https://mmlspark.blob.core.windows.net/maven/com/microsoft/azure/synapseml-core_2.13/1.1.3-spark4.0/synapseml-core_2.13-1.1.3-spark4.0.pom ## Rationale`nThe published Spark 4.0 artifact is compiled against Spark 4.0.1 and fails at JVM class initialization on 4.0.0 with NoSuchMethodError. Pinning the minimum compatible patch keeps the existing flexible minor range while preventing users from selecting a resolvable but binary-incompatible runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Runtime install validation found and fixed one concrete compatibility issue: the published |
|
/azp run |
|
Copilot review |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
docs/Explore Algorithms/Deep Learning/ONNX.md:87
- In the Maven XML example, the placeholders are written as angle-bracket tokens inside element bodies (e.g.,
synapseml-deep-learning_<scala-binary-version>and<version><synapseml-deep-learning-version></version>). Copy/pasting this will produce invalid XML because<...>is parsed as nested tags. Use a valid placeholder form (e.g., escape as<scala-binary-version>/<synapseml-deep-learning-version>, or show concrete..._2.12/..._2.13examples with matching versions).
```xml
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>synapseml-deep-learning_<scala-binary-version></artifactId>
<version><synapseml-deep-learning-version></version>
<exclusions>
- Files reviewed: 15/16 changed files
- Comments generated: 0 new
- Review effort level: Lite
## Summary Replace angle-bracket placeholder tokens inside the ONNX Maven dependency example with copy-safe uppercase tokens and add regression assertions that reject nested placeholder tags. ## Prompting Intent Exhaust exact-head review feedback on PR microsoft#2660 and ensure every documented installation example is syntactically valid and intuitive to adapt. ## Linked Sources - GitHub issue: https://github.com/microsoft/SynapseML/issues/2402`n- Pull request: https://github.com/microsoft/SynapseML/pull/2660`n- Suppressed review finding on commit dc411d0 ## Rationale Plain uppercase replacement tokens remain visually obvious without being parsed as child XML elements. This avoids publishing a copy/paste example that is structurally invalid while retaining one generic example for every supported Scala and Spark flavor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Fixed the current-head suppressed ONNX finding in |
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure build |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2660 +/- ##
=======================================
Coverage 87.19% 87.19%
=======================================
Files 337 337
Lines 19554 19554
Branches 1894 1894
=======================================
Hits 17050 17050
Misses 2504 2504 🚀 New features to boost your workflow:
|
## Summary Replace placeholder-driven installation guidance with concrete published coordinates for master/Spark 3.5, Spark 4.0, and Spark 4.1. Add an automatically resolved master snapshot path, remove unsupported Spark 3.3 and 3.4 install paths, complete ONNX repository snippets, and keep release bump automation aware of the new literals. ## Prompting Intent The engineer asked for a thorough review of PR microsoft#2660 before making usability tweaks in a new worktree. The requested outcome was copy-ready setup guidance for the latest master code and maintained Spark 4.0 and 4.1 lines, applied across every affected PR surface rather than only README.md, while removing obsolete Spark installation instructions. ## Linked Sources - Pull request: microsoft#2660 - Reported JVM/runtime mismatch: microsoft#2402 - Published artifact repository: https://mmlspark.blob.core.windows.net/maven ## Rationale Use literal released coordinates where users need to copy commands, while retaining safe context-anchored release automation so future version bumps remain maintainable. Resolve the moving master snapshot from the CI badge instead of hard-coding it. Keep the snapshot path out of frozen versioned documentation, and scope obsolete-runtime removal to active installation surfaces rather than rewriting historical release documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
9f152c2
into
microsoft:master
Summary
Review blockers resolved
website/src/pages/index.jsuses centralized Spark 3.5/4.0/4.1 coordinates and complete Python variants;installDocs.test.jscovers this surface.pyspark>=3.5,<3.6, and the_2.12JVM coordinate together.numpy==1.22.4dependency is not a Python 3.12/3.13 setup.published-spark-ports.lockcontains only the two independently verified Spark 4 artifact versions. Tests compare rendered documentation and website coordinates to that lock; they do not invoke Git or assume full repository history.Before
Current installation surfaces directed users to Scala 2.12 artifacts such as:
On Spark 4, which uses Scala 2.13, that can leave the Python wrapper importable but the matching JVM class unavailable, producing
LightGBMClassifier does not exist in the JVM.After
All variants use
synapseml==1.1.3; Spark 4 artifacts requirehttps://mmlspark.blob.core.windows.net/maven.Published artifact evidence
v1.1.3-spark4.0andv1.1.3-spark4.1existcom/microsoft/azure/synapse/ml/lightgbm/LightGBMClassifier.classFuture version updates
website/src/installArtifacts.jsexposes the base version from its release-managedsynapseml==...pin, and the current docs reuseSYNAPSEML_VERSIONinstead of repeating the number in each command.website/test/published-spark-ports.lockand update its two values only after the corresponding artifacts exist. The lock is intentionally excluded from automatic base-version replacement.npm testfromwebsite. A base-version bump fails until both explicitly locked port versions agree with the documented coordinates.No commit mapping, tag checkout,
git show, or full-history clone is required.Validation
npm testinwebsite: 31/31 passedgit diff --checkpassedUDFTransformer, and completedspark.range(3).count()on Spark 3.5.0 / Python 3.11, Spark 4.0.1 / Python 3.12, and Spark 4.1.0 / Python 3.12NoSuchMethodError; the install floor is nowpyspark>=4.0.1,<4.1, matching the published POM compile baselineReview follow-up
Closes #2402