Visitar URL original
fix: synchronize global parameter registration and lookup by ranadeepsingh · Pull Request #2806 · microsoft/SynapseML · GitHub
Skip to content

fix: synchronize global parameter registration and lookup - #2806

Merged
Rana Singh (ranadeepsingh) merged 3 commits into
microsoft:masterfrom
ranadeepsingh:fix/global-params-concurrency-20261105
Nov 9, 2026
Merged

Rana Singh (ranadeepsingh) merged 3 commits into
microsoft:masterfrom
ranadeepsingh:fix/global-params-concurrency-20261105

Conversation

@ranadeepsingh

@ranadeepsingh Rana Singh (ranadeepsingh) commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Concurrent stage construction and default lookup can corrupt the shared GlobalParams maps or leave a request spinning indefinitely. This serializes the small registry operations so registration, lookup, assignment and reset use a consistent view.

Related Issues/PRs

Fixes #2804.

Extracted from the scope refinement for #2759. This fix is independent of the native feature and optional recovery work.

What changes are proposed in this pull request?

Use one shared monitor for both maps, preserving existing signatures, precedence and present-null behavior. Add coordinated child-JVM concurrency regressions with bounded termination, plus sequential compatibility controls. No AIPrompt or Delta code is included.

How is this patch tested?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

The files published in 1e8a5098b8a845945b91ad4eaf71659e5469cef1 match the validated source blobs.

sbt "set core / Test / fork := false" core/compile core/Test/compile "core/testOnly com.microsoft.azure.synapse.ml.param.VerifyGlobalParams" core/scalastyle core/Test/scalastyle - passed in this standalone PR worktree: 14/14 tests, zero skips, both compiles, and both style gates. The same targeted gates also passed on the integrated master and both native port validation snapshots, using each branch's selected JDK.

Coverage includes concurrent registration and value operations over 64,000 entries per child JVM, present-null behavior, invalid probe arguments, bounded timeout cleanup, and interruption restoration. Earlier baseline probes exposed mutable-map corruption; targeted cleanup mutations also failed as expected.

All six precommit review stages completed with three independent reviewers per stage. Findings and resolutions are preserved under reviews/pr-2806/. Current-head Azure CI and the subsequent CI-qualified review are still pending; these local results are not a merge-ready claim.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run npm start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

## Summary
Protect global parameter registration, value updates, lookup and reset with one
shared monitor. Add bounded child-JVM regressions for concurrent stage use,
including the existing present-null and reset semantics.

## Prompting Intent
Keep the AIPrompt feature focused and publish independently demonstrated
pre-existing defects as separate fixes. Reproduce the concurrency failure on
baseline without allowing a corrupted map to hang the test runner.

## Linked Sources
- Bug: microsoft#2804
- Scope: microsoft#2759
- Deferred recovery: microsoft#2800

## Rationale
A shared monitor makes the two-map lookup consistent and preserves existing
signatures and Scala Map null/Option behavior. Replacing only one map or using
a null-rejecting concurrent collection would not preserve that contract.
Baseline concurrency probes failed; the fixed probes and existing global
parameter tests passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:01
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Hey Rana Singh (@ranadeepsingh) 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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.

🟢 Approval recommended

No active review issues remain for the shared-registry synchronization change.

No open issues 🎉

What changed in this PR

This PR addresses concurrent access to SynapseML’s shared GlobalParams registry, preventing map corruption and stalled lookups while preserving existing API behavior.

Changes:

  • Synchronizes registration, lookup, assignment, and reset using one shared monitor.
  • Adds isolated child-JVM concurrency regressions with bounded termination and a sequential test for present-null values.
File Description
core/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​param/​VerifyGlobalParams.scala Adds concurrent registration and value-operation probes, plus present-null compatibility coverage.
core/​src/​main/​scala/​com/​microsoft/​azure/​synapse/​ml/​param/​GlobalParams.scala Synchronizes all registry operations without changing public signatures or lookup semantics.

Review effort: Balanced

## Summary
Keep concurrent registry regression probes outside the shared test JVM so a
broken mutable map cannot hang later suites. Bound child termination, finish
cleanup before restoring interruption, and retain the review findings and
resolution evidence.

## Prompting Intent
Complete the validation and review gaps in the AIPrompt prerequisite PR stack
before reporting a merge order. Preserve existing behavior and do not merge.

## Linked Sources
- microsoft#2806
- reviews/pr-2806/

## Rationale
Child JVM isolation contains corrupt-map loops and permanent registrations.
A Java 8-compatible manifest classpath avoids command-line limits. Explicit
timeout and interruption tests verify termination as well as result reporting.

Current source passed core compile, Test compile, VerifyGlobalParams (14/14,
zero skips), and both scalastyle gates on master and the native port snapshots.
The complete six-stage precommit review passed with all three reviewers.
Current-head Azure CI and a fresh CI-qualified review remain separate gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Copilot AI balanced review requested due to automatic review settings November 8, 2026 03:01
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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.

🟢 Approval recommended

No active review issues remain for the global-parameter registry synchronization change.

No open issues 🎉

Review effort: Balanced

## Summary
Remove three trailing-whitespace lines from preserved PR review artifacts.
No production code, tests, build inputs, or review conclusions change.

## Prompting Intent
Make the necessary minor fixes to the reviewed SynapseML PRs, address review
feedback, and verify full CI against each final head without merging.

## Linked Sources
- PR: microsoft#2806
- Issue: microsoft#2804
- Repository artifact policy: AGENTS.md, Pull requests and CI

## Rationale
Keep the numbered review artifacts and their provenance as required by the
repository guide while making the complete PR diff whitespace-clean.
The existing production and regression-test changes are intentionally untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0e8fdfb7-dcdd-4074-aabb-8634695107f2
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

Copilot AI balanced review requested due to automatic review settings November 8, 2026 13:42
@azure-pipelines

Copy link
Copy Markdown
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.

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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.

🟢 Approval recommended

There are no active review issues requiring resolution before approval.

No open issues 🎉

Review effort: Balanced

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

CI triage for head 2ed9bddae48419f92fc2165c5c294da04762fd64: Azure build 245525398 hit the publication TLS/certificate failure tracked in #2812.

The changed-path suites have complete named results: GlobalParamSuite 2/2 and VerifyGlobalParams 14/14, with no skipped cases. The failures were in UnitTests text and UnitTests explainers1 coverage publication (RemoteCertificateNameMismatch). The explainers test-result publisher also failed despite its successful task badge; its console's 65 passes are not substituted for missing named results.

Requested a retry of only those failed jobs on the same build and exact source/target. No certificate bypass, weaker test, product change, or pipeline change was introduced. Full CI remains pending until the retry publishes the missing test results and coverage successfully.

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

Engineering readiness verified for 2ed9bddae48419f92fc2165c5c294da04762fd64, based on current master d3f3af6bd3e4b7d191f51c9eb29f9aeffe788193.

The minor follow-up removed trailing whitespace only. Required numbered review artifacts and their provenance were preserved; production and test code are unchanged from the independently evaluated revision.

  • Azure build 245525398 succeeded on this exact head.
  • Named GlobalParams results: GlobalParamSuite 2/2, VerifyGlobalParams 14/14, no skipped cases. The earlier baseline stress comparison reproduced hangs on the base and passed with the fix.
  • The two publication-failed jobs recovered on their isolated retries: text 37/37; explainers 65 passed, plus two existing explicitly ignored large-input tests. Named results and coverage publication now both succeed. No certificate bypass or CI configuration change was made.
  • No previously published suite disappeared. All 22 non-executed outcomes retain the same per-suite counts as the prior passing build.
  • Current-head automated review is clean; unresolved threads and suppressed findings are both zero. Required GitHub checks are green, and the branch is not behind master.

Only the required human approval remains. This is evidence-based engineering readiness, not a claim of absolute regression freedom; the PR has not been merged.

@ranadeepsingh
Rana Singh (ranadeepsingh) merged commit 0bd8640 into microsoft:master Nov 9, 2026
76 checks passed
Bora Elkin (BoraElkin) pushed a commit to BoraElkin/SynapseML that referenced this pull request Nov 9, 2026
AB#5837660

## Summary
Add a combined persistence regression after integrating the latest master fixes.
Verify that an explicitly assigned Spark session is used without promoting
default scalar parameters into explicit values. Preserve the historical review
archive through rebased links and include the focused integration review.

## Prompting Intent
The engineer approved resolving the newly introduced merge conflicts without
losing either CU behavior or upstream fixes, validating and reviewing the
result, publishing with an explicit force-with-lease, and rerunning CI.

## Linked Sources
- Feature PR: microsoft#2815
- Python method extraction: microsoft#2810
- Assigned Spark sessions: microsoft#2809
- Response cleanup: microsoft#2808
- Attachment cancellation: microsoft#2807
- Global parameter synchronization: microsoft#2806
- Integration target: 6c2699d
- Focused review: reviews/pr-2815/task-5837660-attempt-10-review-0-harness.md

## Rationale
Keep both sides of the code-generation and persistence conflicts rather than
choosing one wholesale. A combined public save/load test checks the interaction
that independent upstream and CU tests do not explicitly cover. Rebase preserves
the six original changes and their messages; all 53 archived report blobs and
modes are unchanged. Local validation passed 310 Scala and 73 Python tests,
with one existing ignored global-fuzzing test, plus style, compilation, codegen
and pinned formatting. New-head CI remains a separate post-publication gate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 653e4257-0554-408f-9e0e-b23750249edb
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Nov 10, 2026
Add AIPrompt on the existing OpenAIPrompt interface for explicit chat,
Responses, embeddings and native decision-model APIs. Preserve request
options, typed results, errors and raw responses through Scala and generated
Python, copy, persistence and pipelines. Add the AIPrompt notebook and guide.

Keep the contribution focused on AIPrompt and small native specializations.
Separate independent legacy defects and optional Delta recovery into their
own issues and PRs. Exercise supported notebook examples on packaged
artifacts, but leave OpenAIDecisions examples commented because Azure
OpenAI/Foundry does not support that API.

- Native inference proposal: microsoft#2759
- Deferred recovery: microsoft#2800
- Deferred live Decisions qualification: microsoft#2760
- Global parameter prerequisite: microsoft#2806
- Attachment cancellation prerequisite: microsoft#2807
- Response cleanup prerequisite: microsoft#2808
- Assigned-session prerequisite: microsoft#2809
- Python stub prerequisite: microsoft#2810
- Existing tutorial: docs/Explore Algorithms/OpenAI/OpenAI.ipynb

Reuse existing authentication and HTTP infrastructure rather than add a
second inference transport. Keep public behavior in Scala and generate
Python conveniences without changing legacy public JVM signatures or
serialized parameter shapes. Explicit API selection and lossless JSON avoid
silent option loss; bounded cancellation handles interrupted Spark work.
Keep ordinary inference lazy and replayable, without Delta, an automatic
tool loop, response-size configuration or an exactly-once claim.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Nov 10, 2026
Add AIPrompt on the existing OpenAIPrompt interface for explicit chat,
Responses, embeddings and native decision-model APIs. Preserve request
options, typed results, errors and raw responses through Scala and generated
Python, copy, persistence and pipelines. Add the AIPrompt notebook and guide.

Keep the contribution focused on AIPrompt and small native specializations.
Separate independent legacy defects and optional Delta recovery into their
own issues and PRs. Exercise supported notebook examples on packaged
artifacts, but leave OpenAIDecisions examples commented because Azure
OpenAI/Foundry does not support that API.

- Native inference proposal: microsoft#2759
- Deferred recovery: microsoft#2800
- Deferred live Decisions qualification: microsoft#2760
- Global parameter prerequisite: microsoft#2806
- Attachment cancellation prerequisite: microsoft#2807
- Response cleanup prerequisite: microsoft#2808
- Assigned-session prerequisite: microsoft#2809
- Python stub prerequisite: microsoft#2810
- Existing tutorial: docs/Explore Algorithms/OpenAI/OpenAI.ipynb

Reuse existing authentication and HTTP infrastructure rather than add a
second inference transport. Keep public behavior in Scala and generate
Python conveniences without changing legacy public JVM signatures or
serialized parameter shapes. Explicit API selection and lossless JSON avoid
silent option loss; bounded cancellation handles interrupted Spark work.
Keep ordinary inference lazy and replayable, without Delta, an automatic
tool loop, response-size configuration or an exactly-once claim.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Nov 10, 2026
Add AIPrompt on the existing OpenAIPrompt interface for explicit chat,
Responses, embeddings and native decision-model APIs. Preserve request
options, typed results, errors and raw responses through Scala and generated
Python, copy, persistence and pipelines. Add the AIPrompt notebook and guide.

Keep the contribution focused on AIPrompt and small native specializations.
Separate independent legacy defects and optional Delta recovery into their
own issues and PRs. Exercise supported notebook examples on packaged
artifacts, but leave OpenAIDecisions examples commented because Azure
OpenAI/Foundry does not support that API.

- Native inference proposal: microsoft#2759
- Deferred recovery: microsoft#2800
- Deferred live Decisions qualification: microsoft#2760
- Global parameter prerequisite: microsoft#2806
- Attachment cancellation prerequisite: microsoft#2807
- Response cleanup prerequisite: microsoft#2808
- Assigned-session prerequisite: microsoft#2809
- Python stub prerequisite: microsoft#2810
- Existing tutorial: docs/Explore Algorithms/OpenAI/OpenAI.ipynb

Reuse existing authentication and HTTP infrastructure rather than add a
second inference transport. Keep public behavior in Scala and generate
Python conveniences without changing legacy public JVM signatures or
serialized parameter shapes. Explicit API selection and lossless JSON avoid
silent option loss; bounded cancellation handles interrupted Spark work.
Keep ordinary inference lazy and replayable, without Delta, an automatic
tool loop, response-size configuration or an exactly-once claim.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Nov 10, 2026
Add AIPrompt on the existing OpenAIPrompt interface for explicit chat,
Responses, embeddings and native decision-model APIs. Preserve request
options, typed results, errors and raw responses through Scala and generated
Python, copy, persistence and pipelines. Add the AIPrompt notebook and guide.

Keep the contribution focused on AIPrompt and small native specializations.
Separate independent legacy defects and optional Delta recovery into their
own issues and PRs. Exercise supported notebook examples on packaged
artifacts, but leave OpenAIDecisions examples commented because Azure
OpenAI/Foundry does not support that API.

- Native inference proposal: microsoft#2759
- Deferred recovery: microsoft#2800
- Deferred live Decisions qualification: microsoft#2760
- Global parameter prerequisite: microsoft#2806
- Attachment cancellation prerequisite: microsoft#2807
- Response cleanup prerequisite: microsoft#2808
- Assigned-session prerequisite: microsoft#2809
- Python stub prerequisite: microsoft#2810
- Existing tutorial: docs/Explore Algorithms/OpenAI/OpenAI.ipynb

Reuse existing authentication and HTTP infrastructure rather than add a
second inference transport. Keep public behavior in Scala and generate
Python conveniences without changing legacy public JVM signatures or
serialized parameter shapes. Explicit API selection and lossless JSON avoid
silent option loss; bounded cancellation handles interrupted Spark work.
Keep ordinary inference lazy and replayable, without Delta, an automatic
tool loop, response-size configuration or an exactly-once claim.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Rana Singh (ranadeepsingh) added a commit that referenced this pull request Nov 12, 2026
* feat: add unified AI prompting and native decision model support

Add AIPrompt on the existing OpenAIPrompt interface for explicit chat,
Responses, embeddings and native decision-model APIs. Preserve request
options, typed results, errors and raw responses through Scala and generated
Python, copy, persistence and pipelines. Add the AIPrompt notebook and guide.

Keep the contribution focused on AIPrompt and small native specializations.
Separate independent legacy defects and optional Delta recovery into their
own issues and PRs. Exercise supported notebook examples on packaged
artifacts, but leave OpenAIDecisions examples commented because Azure
OpenAI/Foundry does not support that API.

- Native inference proposal: #2759
- Deferred recovery: #2800
- Deferred live Decisions qualification: #2760
- Global parameter prerequisite: #2806
- Attachment cancellation prerequisite: #2807
- Response cleanup prerequisite: #2808
- Assigned-session prerequisite: #2809
- Python stub prerequisite: #2810
- Existing tutorial: docs/Explore Algorithms/OpenAI/OpenAI.ipynb

Reuse existing authentication and HTTP infrastructure rather than add a
second inference transport. Keep public behavior in Scala and generate
Python conveniences without changing legacy public JVM signatures or
serialized parameter shapes. Explicit API selection and lossless JSON avoid
silent option loss; bounded cancellation handles interrupted Spark work.
Keep ordinary inference lazy and replayable, without Delta, an automatic
tool loop, response-size configuration or an exactly-once claim.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* style: format AIPrompt Python regression tests

Summary
- Apply the pinned Black formatter to the AIPrompt regression suite and its
  Fabric validation helper.

Prompting Intent
- Keep the focused AIPrompt pull request limited to required feature work
  and repairs to its own validation gates.

Linked Sources
- #2811
- https://github.com/microsoft/SynapseML/actions/runs/42014432464

Rationale
- The Python style gate identified formatting in two new test files.
- The changes preserve both files' Python ASTs, and the repository's
  tracked Python files pass Black 22.3.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* fix: align AIPrompt coverage count and notebook formatting

## Summary
Account for the additional AI test lane in Codecov's expected upload count
and apply the pinned notebook formatter to the new AIPrompt tutorial.

## Prompting Intent
Repair the deterministic checks introduced by the focused AIPrompt change
without changing dependency pins, workflows, release tooling or unrelated
notebooks, and preserve the already-executed tutorial behavior.

## Linked Sources
- #2759
- #2811

## Rationale
The authorized AI matrix lane raises expected uploads from 54 to 55.
Keep the existing coverage-count assertion unchanged and fix its configuration.
Black 22.3.0 with Jupyter support changes formatting only: all 18 code-cell
ASTs, metadata and markdown remain identical, outputs stay cleared and
OpenAIDecisions remains commented. The full CI Black command and the targeted
coverage-upload selection test pass locally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* fix: harden AIPrompt cancellation and compatibility boundaries

Integrate reviewed session-persistence, codegen and attachment fixes; retain
task kill reasons, transport cancellation, value-codec regressions and the
32 supported notebook examples.

Freeze scope, finish running reviews, address blockers, publish and run
current-head CI instead of starting additional full review matrices.

- #2811
- #2818
- #2819
- #2820

Ensure the integrated public AIPrompt path preserves the same cancellation,
persistence and generated-wrapper contracts as the prerequisite fixes.
Keep unsupported Decisions examples commented out and existing limitations
visible. Do not expand scope to unrelated codegen or connector behavior.

Source-scoped qualification covers 511 cognitive and 189 core cases with zero
skips, six notebook cases and 33 installed Python cases. Compile, style,
codegen, packaging and exact installed artifact provenance are retained.
The latest test-only changes passed targeted regressions without altering
the qualified runtime artifacts. Existing reviews and dispositions are
retained; no additional full matrix is claimed. Fresh CI is still required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* docs: explain AIPrompt API contracts with a diagram

## Summary
Add a shared API-routing diagram to the AIPrompt getting-started notebook
and usage guide. Clarify supported parameter mappings, intentional legacy
differences, native results and provider availability without changing code.

## Prompting Intent
Explain whether AIPrompt supports all five API types and preserves the
semantics and parameters of OpenAIPrompt and the native decision stages.
Generate an understandable diagram and include it in the PR description
and the getting-started notebook.

## Linked Sources
- #2811
- #2759
- #2760
- docs/Explore Algorithms/OpenAI/Unified AI prompting.md
- cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/ai/AIRequestAdapter.scala
- cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/ai/AIPrompt.scala
- https://github.com/user-attachments/assets/bfcb52f9-b019-455b-9e23-598a44fae229

## Rationale
Use one GitHub-hosted diagram in the PR, notebook and guide, following
the tutorials' hosted-image convention. Combine a generated background
with deterministic labels and connectors for precise technical content.
Keep the existing runnable examples unchanged and explicitly distinguish
Foundry SystemOne from the unsupported Azure OpenAI/Foundry Decisions path.
Describe per-API support instead of claiming universal legacy parity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* fix: route AIPrompt API versions without a version allowlist

Summary:
- Select the v1 Chat Completions and Responses route with apiVersion.
- Forward other version strings in api-version, including for Decisions.
- Default OpenAIDecisions to v1 while preserving complete URL overrides.
- Cover scalar, per-row and persisted versions and document migration.

Prompting Intent:
Let callers use v1, preview, dated and future API versions through the
existing parameter without library-maintained version restrictions.

Linked Sources:
- User request to select the v1 URI and forward all other version strings.
- #2759
- #2811

Rationale:
API version selection belongs to the provider. Reuse the existing
ServiceParam and preserve public signatures, legacy stages and URL
override behavior instead of introducing a separate routing parameter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* fix: default AIPrompt chat and responses to v1

Summary:
- Default Chat Completions and Responses requests to the v1 route.
- Preserve explicit and configured version overrides and embedding defaults.
- Cover default routing through copy, save/load and clearing an override.
- Update the usage guide and notebook migration notes.

Prompting Intent:
Keep v1 as the default API version for Chat Completions and Responses,
alongside the existing OpenAIDecisions v1 default.

Linked Sources:
- User request: keep v1 as the default for Chat Completions and Responses.
- #2811
- #2759

Rationale:
Use the v1 route without requiring a redundant setter. Change only the
generative fallback so configured scalar and per-row versions, complete
URL overrides, embeddings and legacy OpenAI stages retain their behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

* fix: support Foundry Decisions inference

Foundry exposes Decisions for supported gpt-6-luna deployments, but the
new stages rejected Azure hosts before HTTP and selected bearer-key
authentication for every Decisions endpoint.

Route Azure resource roots through /openai/v1/decisions, retain api-key
authentication for Azure keys, and preserve Entra, proxy, version and
complete-URL behavior. Replace obsolete rejection tests with routing and
authentication regressions. Add opt-in Chat and Responses live tests,
enable the notebook's Foundry Decisions examples, and correct the guide
and shared diagram.

User intent: correct Foundry support and live-test all four inference APIs.
Sources: #2759, #2760,
https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/decisions

Validation: 215 Scala cases, 33 installed-package Python cases, six
notebook tests and four real service tests passed with zero skips.
The live tests exercised Chat, Responses, Decisions and SystemOne using
six valid stage invocations on existing Sweden Central deployments.
Compilation, Scala style, Python formatting, codegen and packaging passed.
Loaded JARs and generated Python sources matched the validated build.
No new deployments or dependency changes; no full notebook rerun or
current-head remote CI pass is claimed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5ba39157-c8dd-4adb-90e0-ff963a1e6733
Bora Elkin (BoraElkin) pushed a commit to BoraElkin/SynapseML that referenced this pull request Nov 12, 2026
AB#5837660

## Summary
Add a combined persistence regression after integrating the latest master fixes.
Verify that an explicitly assigned Spark session is used without promoting
default scalar parameters into explicit values. Preserve the historical review
archive through rebased links and include the focused integration review.

## Prompting Intent
The engineer approved resolving the newly introduced merge conflicts without
losing either CU behavior or upstream fixes, validating and reviewing the
result, publishing with an explicit force-with-lease, and rerunning CI.

## Linked Sources
- Feature PR: microsoft#2815
- Python method extraction: microsoft#2810
- Assigned Spark sessions: microsoft#2809
- Response cleanup: microsoft#2808
- Attachment cancellation: microsoft#2807
- Global parameter synchronization: microsoft#2806
- Integration target: 6c2699d
- Focused review: reviews/pr-2815/task-5837660-attempt-10-review-0-harness.md

## Rationale
Keep both sides of the code-generation and persistence conflicts rather than
choosing one wholesale. A combined public save/load test checks the interaction
that independent upstream and CU tests do not explicitly cover. Rebase preserves
the six original changes and their messages; all 53 archived report blobs and
modes are unchanged. Local validation passed 310 Scala and 73 Python tests,
with one existing ignored global-fuzzing test, plus style, compilation, codegen
and pinned formatting. New-head CI remains a separate post-publication gate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 653e4257-0554-408f-9e0e-b23750249edb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: synchronize global parameter registration and lookup

3 participants