Skip to content

Commit

Permalink
Fix nightly python package links in document (#18770)
Browse files Browse the repository at this point in the history
### Description
Fix nightly python package links.

### Motivation and Context
#15608
#18712
  • Loading branch information
tianleiwu authored Dec 21, 2023
1 parent 4a6f170 commit 7720b66
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions docs/get-started/with-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pip install onnxruntime

```python
## ONNX is built into PyTorch
pip install torch
pip install torch
```
```python
## tensorflow
Expand Down Expand Up @@ -77,7 +77,7 @@ x, y = test_data[0][0], test_data[0][1]
ort_sess = ort.InferenceSession('fashion_mnist_model.onnx')
outputs = ort_sess.run(None, {'input': x.numpy()})

# Print Result
# Print Result
predicted, actual = classes[outputs[0][0].argmax(0)], classes[y]
print(f'Predicted: "{predicted}", Actual: "{actual}"')
```
Expand Down Expand Up @@ -143,7 +143,7 @@ model = ResNet50(weights='imagenet')
preds = model.predict(x)
print('Keras Predicted:', decode_predictions(preds, top=3)[0])
model.save(os.path.join("/tmp", model.name))
```
```
- Convert the model to onnx and export

```python
Expand Down Expand Up @@ -198,7 +198,7 @@ with open("logreg_iris.onnx", "wb") as f:
f.write(onx.SerializeToString())
```


- Load and run the model using ONNX Runtime
We will use ONNX Runtime to compute the predictions for this machine learning model.

Expand Down Expand Up @@ -236,18 +236,33 @@ print(pred_onx)

## Python API Reference Docs

<span class="fs-5"> [Go to the ORT Python API Docs](../api/python/api_summary.html){: .btn .mr-4 target="_blank"} </span>
<span class="fs-5"> [Go to the ORT Python API Docs](../api/python/api_summary.html){: .btn .mr-4 target="_blank"} </span>

## Builds
If using pip, run pip install `--upgrade pip` prior to downloading.
If using pip, run `pip install --upgrade pip` prior to downloading.

| Artifact | Description | Supported Platforms |
|----------- |-------------|---------------------|
|[onnxruntime](https://pypi.org/project/onnxruntime)|CPU (Release)| Windows (x64), Linux (x64, ARM64), Mac (X64), |
|[ort-nightly](https://test.pypi.org/project/ort-nightly)|CPU (Dev) | Same as above |
|[ort-nightly](https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/ORT-Nightly/PyPI/ort-nightly)|CPU (Dev) | Same as above |
|[onnxruntime-gpu](https://pypi.org/project/onnxruntime-gpu)|GPU (Release)| Windows (x64), Linux (x64, ARM64) |
|[ort-nightly-gpu](https://test.pypi.org/project/ort-nightly-gpu)|GPU (Dev) | Same as above |
|[ort-nightly-gpu for CUDA 11.*](https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/ORT-Nightly/PyPI/ort-nightly-gpu) |GPU (Dev) | Windows (x64), Linux (x64, ARM64) |
|[ort-nightly-gpu for CUDA 12.*](https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/ort-cuda-12-nightly/PyPI/ort-nightly-gpu) |GPU (Dev) | Windows (x64), Linux (x64, ARM64) |

Before installing nightly package, you will need install dependencies first.
```
python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
```

Example to install ort-nightly-gpu for CUDA 11.*:
```
python -m pip install ort-nightly-gpu --index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/
```

Example to install ort-nightly-gpu for CUDA 12.*:
```
python -m pip install ort-nightly-gpu --index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-12-nightly/pypi/simple/
```

For Python compiler version notes, see [this page](https://github.com/microsoft/onnxruntime/tree/main/docs/Python_Dev_Notes.md)

Expand All @@ -256,4 +271,3 @@ For Python compiler version notes, see [this page](https://github.com/microsoft/
* [TensorFlow with ONNX Runtime](../tutorials/tf-get-started.md)
* [PyTorch with ONNX Runtime](https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html)
* [scikit-learn with ONNX Runtime](http://onnx.ai/sklearn-onnx/index_tutorial.html)

0 comments on commit 7720b66

Please sign in to comment.