Skip to content

[ENH] remove dangling _fmt usage in detection base and validation#9577

Open
ojuschugh1 wants to merge 1 commit intosktime:mainfrom
ojuschugh1:fix/remove-fmt-dead-code
Open

[ENH] remove dangling _fmt usage in detection base and validation#9577
ojuschugh1 wants to merge 1 commit intosktime:mainfrom
ojuschugh1:fix/remove-fmt-dead-code

Conversation

@ojuschugh1
Copy link
Copy Markdown

Reference Issues/PRs

Fixes #7388. See also #6265, #6958.

What does this implement/fix? Explain your changes.

Removes two leftover pieces of dead code that were missed after the _fmt deprecation in #6265:

  • check_fmt in sktime/utils/validation/detection.py had no callers anywhere in the codebase, so it's been removed along with its entry in __all__.
  • _transform_scores in sktime/detection/base/_base.py was accidentally defined twice in a row. The duplicate has been removed.

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

Just confirming that check_fmt is truly unused and safe to drop, and that removing the duplicate _transform_scores doesn't affect any subclass behavior.

Did you add any tests for the change?

No - both changes are pure deletions of dead code, so no new tests are needed. Existing tests cover the affected paths.

Any other comments?

Pretty straightforward cleanup. Happy to add a deprecation notice for check_fmt first if that's preferred over a hard removal.

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
    How to: add yourself to the all-contributors file in the sktime root directory (not the CONTRIBUTORS.md). Common badges: code - fixing a bug, or adding code logic. doc - writing or improving documentation or docstrings. bug - reporting or diagnosing a bug (get this plus code if you also fixed the bug in the PR).maintenance - CI, test framework, release.
    See here for full badge reference
  • Optionally, for added estimators: I've added myself and possibly to the maintainers tag - do this if you want to become the owner or maintainer of an estimator you added.
    See here for further details on the algorithm maintainer role.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
For new estimators
  • I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

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.

Remove dangling usage of _fmt attribute in child detectors

1 participant