Skip to content

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

Open
Venish Paneliya (VenishPaneliya) wants to merge 1 commit into
microsoft:mainfrom
VenishPaneliya:docs-fit-returns-and-ghost-param
Open

Venish Paneliya (VenishPaneliya) wants to merge 1 commit 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.

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