Skip to content

Commit 2d72aea

Browse files
d4l3kfacebook-github-bot
authored andcommitted
docs: fixups for notebook + badge (#91)
Summary: Some small docs fixups: * install torchx with kfp for notebooks * reduces spam + make extraction more flexible * print the pipeline.yaml at end of example * added shield for pypi version to README Pull Request resolved: #91 Test Plan: CI https://colab.research.google.com/github/pytorch/torchx/blob/gh-pages/0.1.0.dev2/_downloads/1aa1c6eb4233b94bdb0a2d1581cc0b03/advanced_pipeline.ipynb ![2021-06-24-155948_823x625_scrot](https://user-images.githubusercontent.com/909104/123342753-36732280-d505-11eb-86d1-cde2f4157ef6.png) https://github.com/pytorch/torchx/blob/11fd5db8aedba423b30d27ce756477cc5bf312f1/README.md Reviewed By: kiukchung Differential Revision: D29377781 Pulled By: d4l3k fbshipit-source-id: 1933393a2ded461105737f900f2d385ab280557f
1 parent c6af639 commit 2d72aea

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)![Tests](https://github.com/pytorch/torchx/actions/workflows/python-unittests.yaml/badge.svg)![Lint](https://github.com/pytorch/torchx/actions/workflows/lint.yaml/badge.svg)
1+
[![PyPI](https://img.shields.io/pypi/v/torchx)](https://pypi.org/project/torchx/) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE) ![Tests](https://github.com/pytorch/torchx/actions/workflows/python-unittests.yaml/badge.svg) ![Lint](https://github.com/pytorch/torchx/actions/workflows/lint.yaml/badge.svg)
22

33

44
# TorchX

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,9 @@ def handle_item(fieldarg, content):
312312
code_url = "https://github.com/pytorch/torchx/archive/refs/heads/master.tar.gz"
313313

314314
first_notebook_cell = f"""
315-
!pip install torchx
315+
!pip install torchx[kfp]
316316
!wget --no-clobber {code_url}
317-
!tar xvf {notebook_version}.tar.gz torchx-{notebook_version} --strip-components=1
317+
!tar xf {notebook_version}.tar.gz --strip-components=1
318318
319319
NOTEBOOK = True
320320
""".strip()

examples/pipelines/kfp/advanced_pipeline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ def pipeline() -> None:
267267
package_path=args.package_path,
268268
)
269269

270+
with open(args.package_path, "rt") as f:
271+
print(f.read())
272+
270273
# %%
271274
# Once this has all run you should have a pipeline file (typically
272275
# pipeline.yaml) that you can upload to your KFP cluster via the UI or

examples/pipelines/kfp/intro_pipeline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def pipeline() -> None:
5959
package_path="pipeline.yaml",
6060
)
6161

62+
with open("pipeline.yaml", "rt") as f:
63+
print(f.read())
64+
6265
# %%
6366
# Once this has all run you should have a pipeline file (typically
6467
# pipeline.yaml) that you can upload to your KFP cluster via the UI or

0 commit comments

Comments
 (0)