-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DOC] Add example notebook for the graphical pipeline #5175
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
bd84ec9
to
50456a5
Compare
b02eb08
to
c55768e
Compare
@benHeid, are you still working on this? |
Yes, I am planning to work on this again. Was a bit blocked and needed some time to relax in the last weeks :D |
* Try more of a telegram style. * Fix smaller mistakes.
150d1d5
to
ef41c90
Compare
@fkiraly I was able to work on that notebook. I would appreciate feedback :) |
ofc, wasn't sure if it's done |
"<img src=\"img/graphical_pipeline_example.png\" width=900 />\n", | ||
"\n", | ||
"\n", | ||
"**Note:** The current experimental state of the graphical pipeline does not fully support this use-case. However, we are working on this. If you are interested in this use-case and want to contribute, please contact us.\n", |
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.
that's an odd note to start with.
- it appears twice - copy-paste error?
- is it still true that this cannot be done?
- irrespectively, I think it would be best to have a small paragraph at the start that explains "when to use what", and the use cases the graphical pipeline covers in addition.
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.
is the "more complex example" at the bottom not of this kind?
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 can imagine that even more complex stuff can be created. However, I reworked the statement
"1. Pass all steps to the pipeline during initialisation as for the sequential pipelines.\n", | ||
"\n", | ||
"```python\n", | ||
"pipeline = Pipeline([\n", |
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.
should this code not be in jupyter cells? Users will attempt to copy or execxute these, but it is not possible. Imo notebooks like this work best if the instructions are followed by actual code.
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 see why you don't use actual code - you want to explain it abstractly.
Trying to read it with the mindset of someone new to this, I would be confused about (a) what is skobject1
, and (b) the lack of reference conceptualization (e.g., the graph) - "what are we building". Perhaps add a simple example, or merge it with the first?
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 merged it with the following example. Should now be easier to understand
"collapsed": false | ||
}, | ||
"source": [ | ||
"## How to build a Graphical Pipeline\n", |
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.
this section would be much better if a graphical representation comes at the start, and then ecah part of the specification is matched ot a graphical element
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.
Done
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"/Users/benediktheidrich/code/sktime/sktime/pipeline/pipeline.py:160: UserWarning: This generalised graphical pipeline is experimental, with all the usual risks of edge features. For mature alternatives, use single-purpose pipelines and compositors, such as TransformedTargetForecaster, ForecastingPipeline, ClassificationPipeline, etc., see for instance notebooks 01_forecasting.ipynb and 02_classification.ipynb athttps://github.com/sktime/sktime/blob/main/examples/.\n", |
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.
this causes a lot of warnings. To you want to deactivate them at the start of the nb? you can also do so via set_config(warnings="off")
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.
Done
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.
nice notebook!
I left some comments to consider. Imo most important is to get the intro section right, it reads a bit odd. The rest is robust.
Completely forgot about this PR... |
Reference Issues/PRs
See #4652 and #4281
What does this implement/fix? Explain your changes.
This PR adds the graphical pipeline jupyter notebook. Furthermore, it ensures that the ForecastingGridSearchCV call fit,predict etc. using keywords instead of positional arguments to enable that the gridsearch works with the graphical pipeline.
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?
Any other comments?
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
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
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.