Skip to content

Commit

Permalink
more doku
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w-feldmann committed Feb 12, 2025
1 parent c9dc141 commit 864bee8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion molpipeline/pipeline/_skl_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@ def classes_(self) -> list[Any] | npt.NDArray[Any]:
def __sklearn_tags__(self) -> Tags:
"""Return the sklearn tags.
Note
----
This method is copied from the original sklearn implementation.
Changes are marked with a comment.
Returns
-------
Tags
Expand Down Expand Up @@ -900,7 +905,7 @@ def __sklearn_tags__(self) -> Tags:
pass

try:
# Only the _final_estimator is changed from the original implementation
# Only the _final_estimator is changed from the original implementation is changed in the following 2 lines
if (
self._final_estimator is not None
and self._final_estimator != "passthrough"
Expand All @@ -924,6 +929,11 @@ def get_metadata_routing(self) -> MetadataRouter:
Please check :ref:`User Guide <metadata_routing>` on how the routing
mechanism works.
Note
----
This method is copied from the original sklearn implementation.
Changes are marked with a comment.
Returns
-------
MetadataRouter
Expand Down Expand Up @@ -966,6 +976,7 @@ def get_metadata_routing(self) -> MetadataRouter:

router.add(method_mapping=method_mapping, **{name: trans})

# Only the _non_post_processing_steps is changed from the original implementation is changed in the following line
final_name, final_est = self._non_post_processing_steps()[-1]
if final_est is None or final_est == "passthrough":
return router
Expand Down

0 comments on commit 864bee8

Please sign in to comment.