Skip to content

Conversation

@satvshr
Copy link
Contributor

@satvshr satvshr commented Dec 25, 2025

Metadata

Details

  • What does this PR implement/fix? Explain your changes.
    This PR adds unit tests for the OpenML Extension interface and for extension registry behavior. The tests added are the 7 tests mentioned in [ENH] Extension Module Tests (or Examples?) #1545
  • Why is this change necessary? What is the problem it solves?
    Previously, only the non-abstract registry helpers (get_extension_by_model, get_extension_by_flow) were covered. The abstract Extension interface itself was not tested.

@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.72%. Comparing base (c5f68bf) to head (e8c64f2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1560      +/-   ##
==========================================
- Coverage   53.02%   52.72%   -0.31%     
==========================================
  Files          36       36              
  Lines        4326     4326              
==========================================
- Hits         2294     2281      -13     
- Misses       2032     2045      +13     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@satvshr
Copy link
Contributor Author

satvshr commented Jan 12, 2026

Error seems unrelated to the PR given all this PR does is extend the Extension class. The failing test:

    @pytest.mark.sklearn()
    @unittest.skipIf(
        Version(sklearn.__version__) == Version("0.19.1"),
        reason="Requires scikit-learn!=0.19.1, because target flow is from that version.",
    )
    @pytest.mark.production()
    def test_get_flow_with_reinstantiate_strict_with_wrong_version_raises_exception(self):
        self.use_production_server()
        flow = 8175
        expected = "Trying to deserialize a model with dependency sklearn==0.19.1 not satisfied."
        self.assertRaisesRegex(
            ValueError,
            expected,
            openml.flows.get_flow,
            flow_id=flow,
            reinstantiate=True,
            strict_version=True,
        )

Edit: The tests pass locally.

Copy link

@jgyasu jgyasu left a comment

Choose a reason for hiding this comment

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

Looks good to me. I think we can merge this even if the the Extension is planned to be refactored.

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] Extension Module Tests (or Examples?)

4 participants