Repository navigation
[BUG] use instance-level tags in _check_estimator_deps - #601
Open
Me-Priyank wants to merge 1 commit into
Open
Me-Priyank wants to merge 1 commit into
Me-Priyank wants to merge 1 commit into
Conversation
Dependency checks now respect dynamic tag overrides when given an instance.
Author
|
@fkiraly PTAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #600. See also sktime/sktime#10520, sktime/sktime#10528.
What does this implement/fix? Explain your changes.
_check_estimator_deps,_check_python_versionand_check_env_markerread thepython_dependencies,python_versionandenv_markertags viaget_class_tag, so dynamic tag overrides on instances were ignored.This PR adds a private helper
_get_taginskbase/utils/dependencies/_dependencies.py, used in all three places:get_tag(..., raise_error=False), i.e., including dynamic tag overrides;get_class_tag, unchanged. Objects withoutget_tagalso fall back toget_class_tag, as before.Also:
objdocstrings of the three functions accordingly, and corrected theobjdescription of_check_env_marker(previously "used to check python version");_get_taginSKBASE_FUNCTIONS_BY_MODULEinskbase/tests/conftest.py;test_check_estimator_deps_dynamic_tags, parametrized over the three tags. It checks both directions: a failing class tag cleared on the instance passes, and a failing tag set only on the instance fails. The test fails onmainand passes with this change.Does your contribution introduce a new dependency? If yes, which one?
No.
What should a reviewer concentrate their feedback on?
get_tag, classes and objects withoutget_taguseget_class_tagsktimeonce it allows a release containing this:ignore_deps=Trueworks as documented, e.g.,CiscoTSMForecasterwith its own test parameters now fits and predicts with its dummy model withoutcisco-tsminstalled;sktime/forecasting/tests/test_dynamic_dep_tags.pyfail (ChronosForecaster,Chronos2Forecaster), because their__post_init__importstransformers/torch. Today__post_init__is only skipped because the dependency check fails.sktimecurrently pinsscikit-base<1.2.0, so nothing breaks until that bound is raised; thesktimeside likely needs coordinating with [ENH] Isolatetorchimports inforecastingmodule sktime#11087 and [ENH] IntroduceBaseFoundationForecasterto unify zero-shot foundation models sktime#10508.Any other comments?
Local checks: full
skbasetest suite incl. doctests (1620 passed, 23 skipped),skbase/_nopytest_tests.py, and allpre-commithooks on the changed files pass.PR checklist
For all contributions
the PR topic is related to enhancement, CI/CD, maintenance, documentation, or a bug.
For code contributions