Skip to content

Fix init file codegen - #2286

Open
mhamilton723 wants to merge 5 commits into
microsoft:masterfrom
mhamilton723:fix-init-file-codegen
Open

Fix init file codegen#2286
mhamilton723 wants to merge 5 commits into
microsoft:masterfrom
mhamilton723:fix-init-file-codegen

Conversation

@mhamilton723

Copy link
Copy Markdown
Contributor

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Briefly describe the changes included in this Pull Request.

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.

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 yarn run 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.

@mhamilton723

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

@codecov-commenter

codecov-commenter commented Sep 12, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.11%. Comparing base (6854b5f) to head (5029dd7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2286      +/-   ##
==========================================
- Coverage   83.70%   83.11%   -0.59%     
==========================================
  Files         327      327              
  Lines       16788    16795       +7     
  Branches     1500     1493       -7     
==========================================
- Hits        14052    13960      -92     
- Misses       2736     2835      +99     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ranadeepsingh added a commit to ranadeepsingh/SynapseML that referenced this pull request Aug 1, 2026
## Summary
Remove the obsolete automl initializer override that imports the nonexistent _FindBestModel module. With manual initializer preservation enabled, that previously hidden dead code broke AutoML imports in website and Databricks checks.

## Prompting Intent
Iterate on every PR check until green without editing generated output. Diagnose the failures caused by preserving current source overrides and fix the source-level defect exposed by the codegen change.

## Linked Sources
- Current PR: microsoft#2590
- Original init preservation proposal: microsoft#2286
- Failing Azure Pipelines build: https://msdata.visualstudio.com/b9b2accc-2d1c-45b3-9d24-0eb5d78cc47f/_build/results?buildId=229204431
- Prior stale-file analysis: microsoft@0b07808

## Rationale
Delete the override instead of replacing it with another manual import. PyCodegen already generates the valid FindBestModel wildcard import from FindBestModel.py, while _FindBestModel.py has never existed on this branch. Removing dead source keeps generated imports authoritative and avoids preserving a broken compatibility symbol.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ranadeepsingh added a commit to ranadeepsingh/SynapseML that referenced this pull request Aug 1, 2026
## Summary
Include both synapse.ml and synapse.ml.* in component and aggregate setuptools namespace discovery so a preserved non-empty synapse/ml/__init__.py is shipped in wheels. Add component and aggregate wheel-content regression fixtures.

## Prompting Intent
Address the independent PR review finding that init preservation was incomplete at the packaging boundary, validate actual wheel contents, push the existing PR, and rerun all checks to green.

## Linked Sources
- Current PR: microsoft#2590
- Original init preservation proposal: microsoft#2286
- OpenAI codegen compatibility change: microsoft#2560

## Rationale
Setuptools include patterns do not make synapse.ml.* match the synapse.ml package itself. Listing the exact namespace root alongside the descendant wildcard preserves namespace behavior when no root initializer exists while packaging the root whenever codegen retains a non-empty manual initializer. Building and inspecting real fixture wheels guards both setup templates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants