You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nucleus/dataset_item.py
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -122,11 +122,13 @@ class DatasetItem: # pylint: disable=R0902
122
122
123
123
124
124
Attributes:
125
-
image_location: (required if pointcloud_location not present) The location
125
+
image_location: Required if pointcloud_location not present: The location
126
126
containing the image for the given row of data. This can be a local path, or a remote URL.
127
127
Remote formats supported include any URL (http:// or https://) or URIs for AWS S3, Azure, or GCS,
128
128
(i.e. s3://, gcs://)
129
-
reference_id: (required) A user-specified identifier to reference the item.
129
+
reference_id: (required) A user-specified identifier to reference the item. The
130
+
default value is present in order to not have to change argument order, but
131
+
must be replaced.
130
132
metadata: Extra information about the particular dataset item. ints, floats,
131
133
string values will be made searchable in the query bar by the key in this dict
132
134
For example, {"animal": "dog"} will become searchable via
@@ -156,24 +158,24 @@ class DatasetItem: # pylint: disable=R0902
156
158
so your second ingestion will be faster than your first.
157
159
TODOC(Shorten this once we have a guide migrated for metadata, or maybe link
158
160
from other places to here.)
159
-
pointcloud_location: (required if image_location not passed) The remote URL
161
+
pointcloud_location: Required if image_location not present: The remote URL
160
162
containing the pointcloud JSON. Remote formats supported include any URL
161
163
(http:// or https://) or URIs for AWS S3, Azure, or GCS, (i.e. s3://, gcs://)
162
-
upload_to_scale: Set this to false in order to use `privacy mode<https://dashboard.scale.com/nucleus/docs/api#privacy-mode>`_. TODOC (update this once guide is migrated).
163
-
Briefly speaking, setting this to flase means the actual data within the item
164
+
upload_to_scale: Set this to false in order to use `privacy mode<https://dashboard.scale.com/nucleus/docs/api#privacy-mode>`_. TODOC (update this once guide is migrated).
165
+
Setting this to false means the actual data within the item
164
166
(i.e. the image or pointcloud) will not be uploaded to scale meaning that
165
167
you can send in links that are only accessible to certain users, and not to
166
168
Scale.
167
169
"""
168
170
169
171
image_location: Optional[str] =None
170
-
reference_id: Optional[str]=None
172
+
reference_id: str="DUMMY_VALUE"# Done in order to preserve argument ordering and not break old clients.
171
173
metadata: Optional[dict] =None
172
174
pointcloud_location: Optional[str] =None
173
175
upload_to_scale: Optional[bool] =True
174
176
175
177
def__post_init__(self):
176
-
assertself.reference_idisnotNone, "reference_id is required."
178
+
assertself.reference_id!="DUMMY_VALUE", "reference_id is required."
177
179
assertbool(self.image_location) !=bool(
178
180
self.pointcloud_location
179
181
), "Must specify exactly one of the image_location, pointcloud_location parameters"
0 commit comments