提交 db2b5900 编写于 作者: J jingzhang36 提交者: Kubernetes Prow Robot

Add demo of using custom visualization with taxi pipeline (#1533)

* Add example of using custom visualization with taxi pipeline

* fix a typo
上级 0134154f
......@@ -119,6 +119,32 @@ optional for custom visualizations).
8. Click **Generate Visualization**.
9. View generated visualization by scrolling down.
A demo of the above instructions is as follows.
<video width="100%" max-width="100%" height="auto" max-height="100%" controls>
<source src="/docs/videos/taxi_custom_visualization.webm" type="video/webm">
</video>
1. On the Pipelines page, click **[Sample] Unified DSL - Taxi Tip Prediction Model Trainer** to open the Pipeline Details page.
2. On the Pipeline Details page, click **Create run**.
3. On the Create run page,
* Use a run name and an experiment name of your choice or simply use the default names choosen for you.
* In the **pipeline-root** field, specify a storage bucket that you have permission to write to. For example, enter the path to a Google Cloud Storage bucket or an Amazon S3 bucket.
* Click **Start** to create the run.
4. After the run is complete, on the Run Details page, click the step of **statisticsgen**. This step's output is statistics data generated by Tensorflow Data Validation.
5. In the side panel of the selected step,
* Click the **Input/Output** tab to find out the **mlpipeline-ui-metadata** item and click the minio link there. This will open a new browser tab with information on output file path. Copy the output file path as shown in the demo video.
* Get back to the Run Details page, and click the **Artifacts** tab.
* At the top of the tab you should see a card named **Visualization Creator**, choose **Custom** from the drop down menu.
* In the **Custom Visualization Code** field, fill in the following code snippet and replace [output file path] with the output file path you just copied from **mlpipeline-ui-metadata**.
<pre style="overflow-x:scroll;overflow-y:hidden;white-space:pre;">
import tensorflow_data_validation as tfdv
stats = tfdv.load_statistics('[output file path]/stats_tfrecord')
tfdv.visualize_statistics(stats)
</pre>
* Click **Generate Visualization** and wait.
6. Move to the bottom of the **Artifacts** tab to find the generated visualization.
## Known limitations
* Multiple visualizations cannot be generated concurrently.
* This is because a single Python kernel is used to generate visualizations.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册