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

[KFP] Introduce inline visualization #1766

Merged
merged 6 commits into from
Mar 9, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions content/docs/pipelines/sdk/output-viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ viewers later on the page.
</tr>
<tr>
<td><code>storage</code></td>
<td><p>Optional. When <code>storage</code> is 'inline', value of
<code>source</code> is parsed as inline data instead of a path. Applies
<td><p>(Optional) When <code>storage</code> is <code>inline</code>, the value of
<code>source</code> is parsed as inline data instead of a path. This applies
to all types of outputs except <code>tensorboard</code>. See
<a href="#markdown">markdown type</a> or <a href="#web-app">webapp type</a>
<a href="#markdown">Markdown</a> or <a href="#web-app">Web app</a>
below as examples.</p>
<p><b>Be aware</b>, support for inline visualization other than markdown
was introduced in KFP 0.2.5, please make sure your KFP installation is
upgraded.</p>
<p><b>Be aware</b>, support for inline visualizations, other than
markdown, was introduced in Kubeflow Pipelines 0.2.5. Before using these
visualizations, [upgrade your Kubeflow Pipelines cluster](/docs/pipelines/upgrade/)
to version 0.2.5 or higher.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -201,8 +202,8 @@ The `confusion_matrix` viewer plots a confusion matrix visualization of the data
from the given `source` path, using the `schema` to parse the data. The `labels`
provide the names of the classes to be plotted on the x and y axes.

You can optionally specify `'storage': 'inline'` to embed raw content of cm_file
as a string in `source` field directly.
Specify `'storage': 'inline'` to embed raw content of the
confusion matrix csv file as a string in `source` field directly.

**Example:**

Expand All @@ -216,7 +217,7 @@ as a string in `source` field directly.
{'name': 'predicted', 'type': 'CATEGORY'},
{'name': 'count', 'type': 'NUMBER'},
],
'source': cm_file,
'source': <CONFUSION_MATRIX_CSV_FILE>,
# Convert vocab to string because for bealean values we want "True|False" to match csv data.
'labels': list(map(str, vocab)),
}]
Expand Down Expand Up @@ -304,8 +305,8 @@ assumes that the schema includes three columns with the following names:
When viewing the ROC curve, you can hover your cursor over the ROC curve to see
the threshold value used for the cursor's closest `fpr` and `tpr` values.

You can optionally specify `'storage': 'inline'` to embed raw content of roc_file
as a string in `source` field directly.
Specify `'storage': 'inline'` to embed raw content of the roc
curve csv file as a string in `source` field directly.

**Example:**

Expand Down Expand Up @@ -355,7 +356,7 @@ The `table` viewer builds an HTML table out of the data at the given `source`
path, where the `header` field specifies the values to be shown in the first row
of the table. The table supports pagination.

You can optionally specify `'storage': 'inline'` to embed csv table content string
Specify `'storage': 'inline'` to embed csv table content string
in `source` field directly.

**Example:**
Expand Down Expand Up @@ -443,8 +444,7 @@ no references to other files in the filesystem. The HTML file can contain
absolute references to files on the web. Content running inside the web app is
sandboxed in an iframe and cannot communicate with the Kubeflow Pipelines UI.

You can optionally specify `'storage': 'inline'` to embed raw html in `source`
field directly.
Specify `'storage': 'inline'` to embed raw html in `source` field directly.

**Example:**

Expand Down Expand Up @@ -503,6 +503,12 @@ The pipeline uses a number of prebuilt, reusable components, including:
component](https://github.com/kubeflow/pipelines/blob/master/components/dataflow/predict/src/predict.py)
which writes out the data for the `table` viewer.

## Usage in lightweight python components

For lightweight components, the syntax is slightly different. You can refer to
[lightweight python component notebook example](https://github.com/kubeflow/pipelines/blob/master/samples/core/lightweight_component/lightweight_component.ipynb) for how
to declare output visualizations.

## Next step

See how to [export metrics from your
Expand Down