Skip to content

[ENH] Fixes #1051: add hyperactive tuner as importable#1054

Open
Atharv1405 wants to merge 2 commits into
sktime:mainfrom
Atharv1405:issue#1051
Open

[ENH] Fixes #1051: add hyperactive tuner as importable#1054
Atharv1405 wants to merge 2 commits into
sktime:mainfrom
Atharv1405:issue#1051

Conversation

@Atharv1405

Copy link
Copy Markdown

Reference Issues/PRs

Fixes #1051

What does this implement/fix? Explain your changes.

This PR implements the dynamic _placeholder_record forwarding pattern in skpro registry (similar to sktime Prophetverse integration) and registers the ProbaRegOptCV hyperactive-tuner wrapper as an importable placeholder class.

Specifically:

  1. Added _placeholder_record decorator: Created skpro/registry/_placeholder_rec.py containing a dynamic registry utility decorator. If the soft dependency hyperactive is installed in the runtime environment, the class is transparently swapped with the actual external package class (hyperactive.integrations.skpro.ProbaRegOptCV). Otherwise, it keeps the stub class and wraps its init to raise a clean and descriptive soft-dependency ImportError on instantiation.
  2. Created stub class ProbaRegOptCV: Created skpro/model_selection/_hyperactive.py to define the ProbaRegOptCV stub. This contains necessary search tags like "python_dependencies": "hyperactive" to enable registry indexing and documentation generators to find it without requiring the installation of hyperactive beforehand.
  3. Namespace Registration: Exposed _placeholder_record in skpro/registry/init.py and exposed the tuner ProbaRegOptCV in skpro/model_selection/init.py.

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

Yes, it introduces hyperactive as an optional soft dependency. It does not introduce any new hard dependencies

What should a reviewer concentrate their feedback on?

Did you add any tests for the change?

No direct standalone test was added

Any other comments?

PR checklist

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 skpro 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
  • 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.

@fkiraly fkiraly 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.

Thanks! This should have the tests:vm tag though so it runs on a VM.

@Atharv1405

Copy link
Copy Markdown
Author

Added vm tag . i hope its correct now @fkiraly

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.

[ENH] add hyperactive tuner as importable directly from skpro

3 participants