Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions docs/program/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ If you are using the Python SDK, [set up a virtual environment](/program/python-
pip install viam-sdk
```

If you intend to use the [ML (machine learning) model service](/services/ml/), use the following command instead, which installs additional required dependencies along with the Python SDK:

```sh {class="command-line" data-prompt="$"}
pip install 'viam-sdk[mlmodel]'
```

{{% /tab %}}
{{% tab name="Go" %}}

Expand Down
14 changes: 12 additions & 2 deletions docs/program/python-venv.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,23 @@ You can exit this environment by running `deactivate`.

## Install Viam

Inside the activated `viam-env` python environment, you can now install the Viam SDK:
Inside the activated `viam-env` python environment, you can now install the Viam Python SDK:

```sh {class="command-line" data-prompt="$"}
pip3 install viam-sdk
```

This installs Viam and all required dependencies.
This installs the Viam Python SDK and all required general dependencies.

If you intend to use the [ML (machine learning) model service](/services/ml/), install the Python SDK using the `mlmodel` extra:

```sh {class="command-line" data-prompt="$"}
pip3 install 'viam-sdk[mlmodel]'
```

This installs the Viam Python SDK and all required dependencies, including for the ML model service.

You can also run this command on an existing Python SDK install to add support for the ML model service.

If you need to install your own requirements, also install them in this virtual environment.
To make your required packages easier to install in the future, you can also [create a](https://openclassrooms.com/en/courses/6900846-set-up-a-python-environment/6990546-manage-virtual-environments-using-requirements-files) <file>requirements.txt</file> file with a list of all the packages you need and then install the requirements for your client application by running `pip3 install -r requirements.txt`.
Expand Down
14 changes: 14 additions & 0 deletions docs/services/ml/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ In the absence of metadata, your `.tflite_cpu` model must satisfy the following
These requirements are satisfied by a few publicly available model architectures including EfficientDet, MobileNet, and SSD MobileNet V1.
You can use one of these architectures or build your own.

## Use the ML model service with the Viam Python SDK

To use the ML model service from the [Viam Python SDK](https://python.viam.dev/), install the Python SDK using the `mlmodel` extra:

```sh {class="command-line" data-prompt="$"}
pip install 'viam-sdk[mlmodel]'
```

You can also run this command on an existing Python SDK install to add support for the ML model service.

See the [Python documentation](https://python.viam.dev/autoapi/viam/services/mlmodel/mlmodel/index.html#viam.services.mlmodel.mlmodel.MLModel) for more information about the `MLModel` service in Python.

See [Program a smart machine](/program/) for more information about using an SDK to control your smart machine.

## Next Steps

To make use of your model with your smart machine, add a [vision service](/services/vision/) or a [modular resource](/modular-resources/):
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/projects/guardian.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,14 @@ python3 -m venv env
source env/bin/activate
```

Now, install the Python Viam SDK and the VLC module:
Now, install the Python Viam SDK with the `mlmodel` extra, and the VLC module:

```sh {class="command-line" data-prompt="$"}
pip3 install viam-sdk python-vlc
pip3 install 'viam-sdk[mlmodel]' python-vlc
```

The `mlmodel` extra includes additional dependency support for the [ML (machine learning) model service](/services/ml/).

### Connect

Next, go to the **Code sample** tab on your robot page and select **Python**, then click **Copy**.
Expand Down