Skip to content

Commit 6c50994

Browse files
authored
DOCS-3386: Move upload data page and test (#4638)
1 parent f08eca4 commit 6c50994

20 files changed

+404
-318
lines changed

docs/data-ai/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ You can also monitor your machines through teleop, power your application logic,
2828
{{< how-to-expand "Capture data" "4" "BEGINNER-FRIENDLY" "" "data-platform-capture" >}}
2929
{{< cards >}}
3030
{{% card link="/data-ai/capture-data/capture-sync/" noimage="true" %}}
31+
{{% card link="/data-ai/capture-data/upload-other-data/" noimage="true" %}}
3132
{{% card link="/data-ai/capture-data/filter-before-sync/" noimage="true" %}}
3233
{{% card link="/data-ai/capture-data/conditional-sync/" noimage="true" %}}
3334
{{% card link="/data-ai/capture-data/lorawan/" noimage="true" %}}
@@ -49,7 +50,6 @@ You can also monitor your machines through teleop, power your application logic,
4950
{{% card link="/data-ai/train/capture-annotate-images/" noimage="true" %}}
5051
{{% card link="/data-ai/train/train-tf-tflite/" noimage="true" %}}
5152
{{% card link="/data-ai/train/train/" noimage="true" %}}
52-
{{% card link="/data-ai/train/upload-external-data/" noimage="true" %}}
5353
{{< /cards >}}
5454
{{< /how-to-expand >}}
5555

docs/data-ai/ai/act.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ weight: 70
55
layout: "docs"
66
type: "docs"
77
description: "Use the vision service API to act based on inferences."
8-
next: "/data-ai/train/upload-external-data/"
98
---
109

1110
You can use the [vision service API](/dev/reference/apis/services/vision/) to get information about your machine's inferences and program behavior based on that.

docs/data-ai/capture-data/advanced/advanced-data-capture-sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ layout: "docs"
77
type: "docs"
88
platformarea: ["data"]
99
description: "Advanced data capture and data sync configurations."
10-
prev: /data-ai/capture-data/conditional-sync/
10+
prev: /data-ai/capture-data/lorawan/
1111
date: "2025-02-10"
1212
---
1313

docs/data-ai/capture-data/capture-other-sources.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/data-ai/capture-data/conditional-sync.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ aliases:
1515
languages: []
1616
viamresources: ["sensor", "data_manager"]
1717
platformarea: ["data", "registry"]
18-
next: /data-ai/capture-data/advanced/advanced-data-capture-sync/
1918
date: "2024-12-04"
2019
updated: "2025-09-05"
2120
---

docs/data-ai/capture-data/lorawan.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ description: "Configure a gateway and nodes to communicate over the LoRaWAN prot
77
tags: ["sensor", "components", "lorawan", "gateway", "node"]
88
icon: true
99
images: ["/icons/components/sensor.svg"]
10+
next: /data-ai/capture-data/advanced/advanced-data-capture-sync/
1011
---
1112

1213
[LoRaWAN (Long Range Wide Area Network)](https://lora-alliance.org/) enables sensor communication spanning kilometers with minimal power usage.
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
---
2+
linkTitle: "Upload data"
3+
title: "Upload data to Viam"
4+
images: ["/services/icons/data-folder.svg"]
5+
weight: 60
6+
layout: "docs"
7+
type: "docs"
8+
languages: ["python"]
9+
viamresources: ["data_manager"]
10+
aliases:
11+
- /data/upload/
12+
- /services/data/upload/
13+
- /how-tos/upload-data/
14+
- /data-ai/ai/advanced/upload-external-data/
15+
- /data-ai/ai/advanced/
16+
- /data-ai/train/upload-external-data/
17+
date: "2024-12-04"
18+
updated: "2025-09-11"
19+
description: "Upload data to Viam from your local computer or mobile device using the data client API, Viam CLI, or Viam mobile app."
20+
---
21+
22+
When you configure the data management service, Viam automatically uploads data from the default directory `~/.viam/capture` and any directory you configured.
23+
If you want to upload data from another directory or source, you can also:
24+
25+
- [Sync a batch of data from another directory](#sync-a-batch-of-data-from-another-directory)
26+
- [Upload data with SDKs](#upload-data-with-sdks)
27+
- [Upload images with the Viam mobile app](#upload-images-with-the-viam-mobile-app)
28+
29+
## Sync a batch of data from another directory
30+
31+
Typically, you configure the data management service to [capture and sync data from your machine at regular intervals](/data-ai/capture-data/capture-sync/).
32+
However, you can also use the data management service to sync data from a folder.
33+
This can be a dataset you wish to upload once or data that is periodically written to a folder on your system.
34+
35+
### Prerequisites
36+
37+
{{% expand "A running machine connected to Viam" %}}
38+
39+
{{% snippet "setup-both.md" %}}
40+
41+
{{% /expand%}}
42+
43+
### Instructions
44+
45+
{{% alert title="Data will be removed from the device once uploaded to Viam" color="caution" %}}
46+
47+
If you do not want the data deleted from your machine, copy the data to a new folder and sync that folder instead so that your local copy remains.
48+
49+
{{% /alert %}}
50+
51+
{{< table >}}
52+
{{% tablestep start=1 %}}
53+
**Add the data management service**
54+
55+
On your machine's **CONFIGURE** tab, click the **+** icon next to your machine part in the left-hand menu and select **Component or service**.
56+
57+
Select the `data management` service and click **Create**.
58+
On the data management panel, you can see the configuration options.
59+
You can leave the default data sync interval of `0.1` minutes to sync every 6 seconds.
60+
61+
{{% /tablestep %}}
62+
{{% tablestep %}}
63+
**Configure sync from the additional folder**
64+
65+
In the **Additional paths**, enter the full path to the directory with the data you want to upload, for example, `/Users/Artoo/my_cat_photos`.
66+
All of the data in the folder will be synced, so be sure that you want to upload all of the contents of the folder before saving your configuration.
67+
68+
Toggle **Syncing** to on (green) if it isn't already on.
69+
70+
Click **Save** in the top right corner of the page.
71+
72+
{{<imgproc src="/services/data/data-sync-temp.png" resize="x1100" declaredimensions=true alt="Data service configured as described." class="shadow" >}}
73+
74+
{{% /tablestep %}}
75+
{{% tablestep %}}
76+
**Confirm that your data uploaded**
77+
78+
Navigate to your [**DATA** page](https://app.viam.com/data/view) and confirm that your data appears there.
79+
If you don't see your files yet, wait a few moments and refresh the page.
80+
81+
{{% /tablestep %}}
82+
{{< /table >}}
83+
84+
## Upload data with SDKs
85+
86+
You can use the [Data Client API](/dev/reference/apis/data-client/) to upload files to the Viam Cloud.
87+
88+
Unlike when using the data management service, using the [`FileUploadFromPath`](/dev/reference/apis/data-client/#fileuploadfrompath) method uploads the files even if they already exist in the cloud.
89+
In other words, it duplicates data if you run it multiple times.
90+
91+
Also unlike data sync, this method _does not_ delete data from your device.
92+
93+
### Instructions
94+
95+
{{< table >}}
96+
{{% tablestep start=1 %}}
97+
**Get API key**
98+
99+
Go to your organization's setting page and create an API key for a {{< glossary_tooltip term_id="part" text="machine part" >}}, {{< glossary_tooltip term_id="part" text="machine" >}}, {{< glossary_tooltip term_id="location" text="location" >}}, or {{< glossary_tooltip term_id="organization" text="organization" >}}.
100+
101+
{{% /tablestep %}}
102+
{{% tablestep %}}
103+
**Upload a file from a path**
104+
105+
Use the [`FileUploadFromPath`](/dev/reference/apis/data-client/#fileuploadfrompath) method to upload a file.
106+
107+
You must provide a {{< glossary_tooltip term_id="part" text="machine part" >}} ID to associate data with.
108+
109+
{{< tabs >}}
110+
{{< tab name="Python" >}}
111+
112+
To upload just one file, make a call to [`file_upload_from_path`](/dev/reference/apis/data-client/#fileuploadfrompath):
113+
114+
{{< read-code-snippet file="/static/include/examples-generated/upload-single-file.snippet.upload-single-file.py" lang="py" class="line-numbers linkable-line-numbers" data-line="31-38" >}}
115+
116+
{{% /tab %}}
117+
{{< tab name="Go" >}}
118+
119+
{{< read-code-snippet file="/static/include/examples-generated/upload-single-file.snippet.upload-single-file.go" lang="go" class="line-numbers linkable-line-numbers" data-line="33-40" >}}
120+
121+
{{% /tab %}}
122+
{{< /tabs >}}
123+
124+
{{% /tablestep %}}
125+
{{% tablestep %}}
126+
**Run your code**
127+
128+
Save and run your code once.
129+
Running your code more than once will duplicate the data.
130+
131+
{{% /tablestep %}}
132+
{{% tablestep %}}
133+
**Confirm that your data uploaded**
134+
135+
Navigate to your [**DATA** page](https://app.viam.com/data/view) and confirm that your data appears there.
136+
137+
{{% /tablestep %}}
138+
{{< /table >}}
139+
140+
## Upload images with the Viam mobile app
141+
142+
Upload images as machine data straight from your phone, skipping the normal data capture and cloud synchronization process, through the [Viam mobile app](/manage/troubleshoot/teleoperate/default-interface/#viam-mobile-app).
143+
This is useful if you want to capture images for training machine learning models on the go.
144+
145+
### Prerequisites
146+
147+
{{< expand "Download the Viam mobile app and sign into your Viam account" >}}
148+
149+
Install the mobile app from the [App Store](https://apps.apple.com/vn/app/viam-robotics/id6451424162) or [Google Play](https://play.google.com/store/apps/details?id=com.viam.viammobile&hl=en&gl=US).
150+
151+
<a href="https://apps.apple.com/vn/app/viam-robotics/id6451424162" target="_blank">
152+
<img src="https://github.com/viamrobotics/docs/assets/90707162/a470b65d-1b97-412f-9f97-daf902f2f053" width="200px" alt="apple store icon" class="center-if-small" >
153+
</a>
154+
155+
<a href="https://play.google.com/store/apps/details?id=com.viam.viammobile&hl=en&gl=US" target="_blank">
156+
<img src="https://github.com/viamrobotics/docs/assets/90707162/6ebd6960-08c5-41d4-81f9-42293fbfdfd4" width="200px" alt="google play store icon" class="center-if-small" >
157+
</a>
158+
159+
{{< /expand >}}
160+
161+
### Instructions
162+
163+
{{< table >}}
164+
{{% tablestep start=1 %}}
165+
**Navigate to your machine**
166+
167+
In the Viam mobile app, select an organization by clicking on the menu icon in the top left corner.
168+
169+
Tap the **Locations** tab and select a location, then select the machine you want your data to be associated with.
170+
171+
{{% /tablestep %}}
172+
{{% tablestep %}}
173+
**Upload images**
174+
175+
Tap the menu button marked "**...**" in the upper right corner.
176+
Tap **Upload Images**.
177+
178+
Select each image you want to upload, then tap **Add**.
179+
180+
The uploaded images metadata will contain the machine part you selected.
181+
However, the uploaded images will not be associated with a component or method.
182+
183+
{{% /tablestep %}}
184+
{{< /table >}}
185+
186+
## Next steps
187+
188+
If you uploaded a dataset for machine learning, continue to [create a dataset](/data-ai/train/create-dataset/).

docs/data-ai/train/create-dataset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Use the Viam CLI to filter images by label and add the filtered images to a data
117117
To add an image to a dataset, find the binary data ID for the image and the dataset ID.
118118
Pass both IDs to [`data_client.add_binary_data_to_dataset_by_ids`](/dev/reference/apis/data-client/#addbinarydatatodatasetbyids):
119119

120-
{{< read-code-snippet file="/static/include/examples-generated/add-to-dataset.snippet.add-to-dataset.py" lang="python" class="line-numbers linkable-line-numbers" data-line="31-34" >}}
120+
{{< read-code-snippet file="/static/include/examples-generated/add-to-dataset.snippet.add-to-dataset.py" lang="python" class="line-numbers linkable-line-numbers" data-line="30-33" >}}
121121

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

0 commit comments

Comments
 (0)