Skip to content
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

Update pipeline docs after API change #2195

Merged
merged 9 commits into from Apr 28, 2021
Merged

Update pipeline docs after API change #2195

merged 9 commits into from Apr 28, 2021

Conversation

angela97lin
Copy link
Contributor

Closes #2158

@angela97lin angela97lin self-assigned this Apr 27, 2021
@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #2195 (82f3569) into main (0c5e98a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2195   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         296      296           
  Lines       24712    24712           
=======================================
  Hits        24694    24694           
  Misses         18       18           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c5e98a...82f3569. Read the comment docs.

Copy link
Contributor

@dsherry dsherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! 😁

@@ -187,7 +189,8 @@
"metadata": {},
"source": [
"## Pipeline Parameters\n",
"You can also pass in custom parameters, which will then be used when instantiating each component in `component_graph`. The parameters dictionary needs to be in the format of a two-layered dictionary where the key-value pairs are the component name and corresponding component parameters dictionary. The component parameters dictionary consists of (parameter name, parameter values) key-value pairs.\n",
"\n",
"You can also pass in custom parameters by using the `parameters` parameter, which will then be used when instantiating each component in `component_graph`. The parameters dictionary needs to be in the format of a two-layered dictionary where the key-value pairs are the component name and corresponding component parameters dictionary. The component parameters dictionary consists of (parameter name, parameter values) key-value pairs.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it

"with open('pipeline.pkl', 'rb') as f:\n",
" pickled_pipeline = pickle.load(f)\n",
"\n",
"pickled_pipeline.fit(X, y)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. I would add

assert pickled_pipeline == pipeline_to_pickle

before the call to fit, to demonstrate the two pipeline instances are equivalent.

" - `TimeSeriesMulticlassClassificationPipeline`\n",
" \n",
"The class you want to use will depend on your problem type.\n",
"The only required parameter input for instantiating a pipeline instance is `component_graph`, which is either a list or a dictionary containing a sequence of components to be fit and evaluated.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great to me!

Copy link
Contributor

@ParthivNaresh ParthivNaresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect!

Copy link
Contributor

@chukarsten chukarsten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good work. Nothing blocking here - just the comment on how I'm personally not sure what's going on with component_obj = None and what you're trying to show there. Nice. I do like this documentation a lot.

"\n",
" def __init__(self, parameters, random_seed=0):\n",
" super().__init__(self.component_graph, parameters=parameters, random_seed=random_seed)\n"
"component_graph_as_list = ['Imputer', 'Random Forest Classifier']\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a lot simpler.

Comment on lines 75 to 77
"metadata": {
"scrolled": true
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this? lol, does it mean it starts scrolled down?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently means the cell was scrolled yeah lol I'm gonna delete this 😂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: does that change how the docs look on RTD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I could tell... 🤔

" parameters = {\"parameter_1\": parameter_1}\n",
" super().__init__(parameters=parameters,\n",
" component_obj=transformer,\n",
" component_obj=None,\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer the method of making a third party transformer? I think this change is a little confusing because it begs the question "what is the component_obj param?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahaha previously it didn't use a real third party transformer but it never error-ed because the code wasn't run... now that's no longer the case 😓 I can update this to use a real third party transformer and then comment it as such!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we have info on this on our components doc which is linked so I'll just remove this line so it's not a focus.

docs/source/user_guide/pipelines.ipynb Show resolved Hide resolved
@angela97lin angela97lin merged commit eb7b3db into main Apr 28, 2021
@angela97lin angela97lin deleted the 2158_pipeline_docs branch April 28, 2021 16:42
This was referenced May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update documentation to use pipeline instances instead of pipeline subclasses
6 participants