scikit-base 1.0.2__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scikit_base-1.0.2/scikit_base.egg-info → scikit_base-1.1.0}/PKG-INFO +2 -2
- {scikit_base-1.0.2 → scikit_base-1.1.0}/README.md +1 -1
- {scikit_base-1.0.2 → scikit_base-1.1.0}/pyproject.toml +1 -1
- {scikit_base-1.0.2 → scikit_base-1.1.0/scikit_base.egg-info}/PKG-INFO +2 -2
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/__init__.py +1 -1
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_base.py +2 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_tagmanager.py +28 -15
- {scikit_base-1.0.2 → scikit_base-1.1.0}/LICENSE +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/docs/source/conf.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/scikit_base.egg-info/SOURCES.txt +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/scikit_base.egg-info/dependency_links.txt +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/scikit_base.egg-info/requires.txt +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/scikit_base.egg-info/top_level.txt +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/scikit_base.egg-info/zip-safe +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/setup.cfg +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/_exceptions.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/_nopytest_tests.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_clone_base.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_clone_plugins.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_meta.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/_object_html_repr.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/_pprint.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/tests/test_object_html_repr.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/tests/test_pprint.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/lookup/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/lookup/_lookup.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/lookup/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/lookup/tests/test_lookup.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/testing/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/testing/test_all_objects.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/testing/utils/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/testing/utils/_conditional_fixtures.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/testing/utils/inspect.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/conftest.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/mock_package/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/mock_package/test_mock_package.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_base.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_baseestimator.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_deep_equals.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_exceptions.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_lookup.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_lookup_metaclasses.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_meta.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/tests/test_tagaliaser.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/_check.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/_nested_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/_utils.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/deep_equals/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/deep_equals/_common.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/deep_equals/_deep_equals.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/_dependencies.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/_import.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/tests/test_check_dependencies.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/tests/test_safe_import.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/doctest_run.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/git_diff.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/random_state.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/stderr_mute.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/stdout_mute.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_check.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_deep_equals.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_nested_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_random_state.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_std_mute.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/tests/test_utils.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/_named_objects.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/_type_checks.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/tests/test_iterable_named_objects.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/tests/test_type_validations.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scikit-base
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Base classes for sklearn-like parametric objects
|
|
5
5
|
Author-email: sktime developers <sktime.toolbox@gmail.com>
|
|
6
6
|
Maintainer: Franz Király
|
|
@@ -115,7 +115,7 @@ Dynamic: license-file
|
|
|
115
115
|
`skbase` provides base classes for creating scikit-learn-like parametric objects,
|
|
116
116
|
along with tools to make it easier to build your own packages that follow these design patterns.
|
|
117
117
|
|
|
118
|
-
:rocket: Version 1.0
|
|
118
|
+
:rocket: Version 1.1.0 is now available. Check out our
|
|
119
119
|
[release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
|
|
120
120
|
|
|
121
121
|
| Overview | |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`skbase` provides base classes for creating scikit-learn-like parametric objects,
|
|
8
8
|
along with tools to make it easier to build your own packages that follow these design patterns.
|
|
9
9
|
|
|
10
|
-
:rocket: Version 1.0
|
|
10
|
+
:rocket: Version 1.1.0 is now available. Check out our
|
|
11
11
|
[release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
|
|
12
12
|
|
|
13
13
|
| Overview | |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scikit-base
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Base classes for sklearn-like parametric objects
|
|
5
5
|
Author-email: sktime developers <sktime.toolbox@gmail.com>
|
|
6
6
|
Maintainer: Franz Király
|
|
@@ -115,7 +115,7 @@ Dynamic: license-file
|
|
|
115
115
|
`skbase` provides base classes for creating scikit-learn-like parametric objects,
|
|
116
116
|
along with tools to make it easier to build your own packages that follow these design patterns.
|
|
117
117
|
|
|
118
|
-
:rocket: Version 1.0
|
|
118
|
+
:rocket: Version 1.1.0 is now available. Check out our
|
|
119
119
|
[release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
|
|
120
120
|
|
|
121
121
|
| Overview | |
|
|
@@ -58,6 +58,7 @@ import re
|
|
|
58
58
|
import warnings
|
|
59
59
|
from collections import defaultdict
|
|
60
60
|
from copy import deepcopy
|
|
61
|
+
from functools import lru_cache
|
|
61
62
|
from inspect import isclass
|
|
62
63
|
from typing import List
|
|
63
64
|
|
|
@@ -214,6 +215,7 @@ class BaseObject(_FlagManager):
|
|
|
214
215
|
return None
|
|
215
216
|
|
|
216
217
|
@classmethod
|
|
218
|
+
@lru_cache(maxsize=None)
|
|
217
219
|
def _get_init_signature(cls):
|
|
218
220
|
"""Get class init signature.
|
|
219
221
|
|
|
@@ -9,11 +9,30 @@ __all__ = ["_FlagManager"]
|
|
|
9
9
|
|
|
10
10
|
import inspect
|
|
11
11
|
from copy import deepcopy
|
|
12
|
+
from functools import lru_cache
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class _FlagManager:
|
|
15
16
|
"""Mixin class for flag and configuration settings management."""
|
|
16
17
|
|
|
18
|
+
@staticmethod
|
|
19
|
+
@lru_cache(maxsize=None)
|
|
20
|
+
def _collect_class_flags_cached(cls, flag_attr_name):
|
|
21
|
+
"""Walk the MRO once per (cls, flag_attr_name) and cache the result.
|
|
22
|
+
|
|
23
|
+
Returns the dict directly; callers are responsible for copying it
|
|
24
|
+
before handing it out or mutating it, since this is a shared cached
|
|
25
|
+
object.
|
|
26
|
+
"""
|
|
27
|
+
collected_flags = {}
|
|
28
|
+
for parent_class in reversed(inspect.getmro(cls)):
|
|
29
|
+
if parent_class is object:
|
|
30
|
+
continue
|
|
31
|
+
if flag_attr_name in parent_class.__dict__:
|
|
32
|
+
more_flags = parent_class.__dict__[flag_attr_name]
|
|
33
|
+
collected_flags.update(more_flags)
|
|
34
|
+
return collected_flags
|
|
35
|
+
|
|
17
36
|
@classmethod
|
|
18
37
|
def _get_class_flags(cls, flag_attr_name="_flags"):
|
|
19
38
|
"""Get class flags from estimator class and all its parent classes.
|
|
@@ -30,19 +49,10 @@ class _FlagManager:
|
|
|
30
49
|
class attribute via nested inheritance. NOT overridden by dynamic
|
|
31
50
|
flags set by set_flags or clone_flags.
|
|
32
51
|
"""
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
for parent_class in reversed(inspect.getmro(cls)):
|
|
38
|
-
if parent_class is object:
|
|
39
|
-
continue
|
|
40
|
-
if flag_attr_name in parent_class.__dict__:
|
|
41
|
-
# Check own __dict__ to avoid MRO-inherited duplicates
|
|
42
|
-
more_flags = parent_class.__dict__[flag_attr_name]
|
|
43
|
-
collected_flags.update(more_flags)
|
|
44
|
-
|
|
45
|
-
return deepcopy(collected_flags)
|
|
52
|
+
cached = cls._collect_class_flags_cached(cls, flag_attr_name)
|
|
53
|
+
# shallow copy: cheap, and safe because tag values are immutable
|
|
54
|
+
# (they are primitives types bool, etc.)
|
|
55
|
+
return dict(cached)
|
|
46
56
|
|
|
47
57
|
@classmethod
|
|
48
58
|
def _get_class_flag(
|
|
@@ -101,12 +111,15 @@ class _FlagManager:
|
|
|
101
111
|
class attribute via nested inheritance and then any overrides
|
|
102
112
|
and new flags from [flag_attr_name]_dynamic object attribute.
|
|
103
113
|
"""
|
|
104
|
-
|
|
114
|
+
# shallow copy of the cached class-level dict
|
|
115
|
+
collected_flags = dict(
|
|
116
|
+
self._collect_class_flags_cached(type(self), flag_attr_name)
|
|
117
|
+
)
|
|
105
118
|
|
|
106
119
|
if hasattr(self, f"{flag_attr_name}_dynamic"):
|
|
107
120
|
collected_flags.update(getattr(self, f"{flag_attr_name}_dynamic"))
|
|
108
121
|
|
|
109
|
-
return
|
|
122
|
+
return collected_flags
|
|
110
123
|
|
|
111
124
|
def _get_flag(
|
|
112
125
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/base/_pretty_printing/tests/test_object_html_repr.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/utils/dependencies/tests/test_check_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit_base-1.0.2 → scikit_base-1.1.0}/skbase/validate/tests/test_iterable_named_objects.py
RENAMED
|
File without changes
|
|
File without changes
|