-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Link to docs in object's html repr #6876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Link to docs in object's html repr #6876
Conversation
hm, doc build appears to be failing - looks like circular imports to me |
FYI, if you want to override, you need to inherit
and not because the MRO puts earlier parent classes at the last overrides. Changed, to see what that does. |
strange, it does not seem to find the css file? |
good catch, thx |
…/mateuszkasprowicz/sktime into link-to-docs-from-estimator-repr
restarted tests |
@fkiraly any idea why is CI proceeding to schedule so many jobs, as initial ones failed? |
The reason is that most jobs are gated behind It is in general unusual that tests are failing in this combination, i.s., |
step 1: Revert change from .css to _css step 2: include css files as part of package
53eb5c7
to
c588bde
Compare
I pushed an attempted fix, hopefully you don't mind. I request you to kindly review and revert if not working and/or incorrect. This is my hypothesis:
@mateuszkasprowicz I suggest you to test locally in a new environment where sktime is not installed as editable from a working directory that is outside your local clone. If my attempt fails, I think debugging that way will identify the real issue. |
|
The failures are unrelated, they seem to be caused by this: #6884 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, brilliant! I tested this with various estimators, and composites such as ForecastingPipeline
and DirectReductionForecaster
.
Two issues that came up and I think we ought to address:
- Pipelines render left-to-right rather than top-to-bottom.
I am not sure how to fix this, the best would be to add a tag that somehow controls this for a given composite. See display below for the ForecastingPipeline
.
However, this is not something new and has already been like this for the old html display.
- The html display is no longer cross-compatible with the previous one, so estimator composites out of the two will not render.
An example of this is the following estimator composite which has an sklearn estimator inside an skpro estimator, inside an sktime estimator:
from sktime.forecasting.compose import DirectTabularRegressionForecaster
fs = DirectTabularRegressionForecaster.create_test_instances_and_names()
fs[0][2]
Interestingly, the sklearn estimator is displayed, but not the skpro estimator:
However, this also seems to be an issue with the old display, again not something introduced by this PR.
Since these seem to be existing problems and not introdued or changed by this PR, moving them to a new issue: #6903 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope you don't mind, I tried to reduce coupling and make a future refactor upwards easier, by moving all new methods into the mixin.
Reference Issues/PRs
Implements #6812
Depends on #6882 for the css fix
What does this implement/fix? Explain your changes.
Does your contribution introduce a new dependency? If yes, which one?
No
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Yes
Any other comments?
_estimator_html_repr.py
is based on skbase with doc link added based on sklearn_estimator_html_repr.py
is based on sklearn with "fitted" classes removed as we don't use "fitted" indicator in html reprPR checklist
For all contributions
How to: add yourself to the all-contributors file in the 8000
sktime
root directory (not theCONTRIBUTORS.md
). Common badges:code
- fixing a bug, or adding code logic.doc
- writing or improving documentation or docstrings.bug
- reporting or diagnosing a bug (get this pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference
maintainers
tag - do this if you want to become the owner or maintainer of an estimator you added.See here for further details on the algorithm maintainer role.
For new estimators
docs/source/api_reference/taskname.rst
, follow the pattern.Examples
section.python_dependencies
tag and ensureddependency isolation, see the estimator dependencies guide.