From d82dd8a757d5d837c9c9b79d3c89347b66111aab Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Fri, 18 Apr 2025 09:40:47 +0530 Subject: [PATCH 1/3] Correct broken source links for `set_params` and `get_params` in Aeon estimator docs --- aeon/base/_base.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/aeon/base/_base.py b/aeon/base/_base.py index 5a336c7397..2176e54262 100644 --- a/aeon/base/_base.py +++ b/aeon/base/_base.py @@ -219,6 +219,23 @@ def get_class_tag( return tag_value + def get_params(self, deep=True): + """ + Get parameters for this estimator. + + Parameters + ---------- + deep : bool, default=True + If True, will return the parameters for this estimator and + contained subobjects that are estimators. + + Returns + ------- + params : dict + Parameter names mapped to their values. + """ + return super().get_params(deep=deep) + def get_tags(self): """ Get tags from estimator. @@ -280,6 +297,26 @@ def get_tag(self, tag_name, raise_error=True, tag_value_default=None): return tag_value + def set_params(self, **params): + """Set the parameters of this estimator. + + The method works on simple estimators as well as on nested objects + (such as :class:`~sklearn.pipeline.Pipeline`). The latter have + parameters of the form ``__`` so that it's + possible to update each component of a nested object. + + Parameters + ---------- + **params : dict + Estimator parameters. + + Returns + ------- + self : estimator instance + Estimator instance. + """ + super().set_params(**params) + def set_tags(self, **tag_dict): """ Set dynamic tags to given values. From 2460201d07348cfaec9a459220b76676ddf657a0 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Thu, 24 Apr 2025 13:34:25 +0530 Subject: [PATCH 2/3] made necessary changes --- aeon/base/_base.py | 37 ------------------------------------- docs/conf.py | 4 ++++ 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/aeon/base/_base.py b/aeon/base/_base.py index 2176e54262..5a336c7397 100644 --- a/aeon/base/_base.py +++ b/aeon/base/_base.py @@ -219,23 +219,6 @@ def get_class_tag( return tag_value - def get_params(self, deep=True): - """ - Get parameters for this estimator. - - Parameters - ---------- - deep : bool, default=True - If True, will return the parameters for this estimator and - contained subobjects that are estimators. - - Returns - ------- - params : dict - Parameter names mapped to their values. - """ - return super().get_params(deep=deep) - def get_tags(self): """ Get tags from estimator. @@ -297,26 +280,6 @@ def get_tag(self, tag_name, raise_error=True, tag_value_default=None): return tag_value - def set_params(self, **params): - """Set the parameters of this estimator. - - The method works on simple estimators as well as on nested objects - (such as :class:`~sklearn.pipeline.Pipeline`). The latter have - parameters of the form ``__`` so that it's - possible to update each component of a nested object. - - Parameters - ---------- - **params : dict - Estimator parameters. - - Returns - ------- - self : estimator instance - Estimator instance. - """ - super().set_params(**params) - def set_tags(self, **tag_dict): """ Set dynamic tags to given values. diff --git a/docs/conf.py b/docs/conf.py index 65844dbb71..54034bc2e6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -183,6 +183,10 @@ def find_source(): filename = "aeon/%s#L%d-L%d" % find_source() except Exception: filename = info["module"].replace(".", "/") + ".py" + + if filename.split("/")[0] == "aeon": + return None + return "https://github.com/aeon-toolkit/aeon/blob/{}/{}".format( github_tag, filename, From 769850e7ca771f48cd3ec62327eed223b65ea3d3 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Thu, 24 Apr 2025 13:35:31 +0530 Subject: [PATCH 3/3] made necessary changes --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 54034bc2e6..c8c26a5e5a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -184,7 +184,7 @@ def find_source(): except Exception: filename = info["module"].replace(".", "/") + ".py" - if filename.split("/")[0] == "aeon": + if filename.split("/")[0] != "aeon": return None return "https://github.com/aeon-toolkit/aeon/blob/{}/{}".format(