Skip to content

Commit 506355a

Browse files
author
Anthony Krivonos
authored
[WIP] Doc change for context images (#357)
* Doc change for context images * style * style and scene * Bump version and add comment
1 parent 2b84814 commit 506355a

File tree

7 files changed

+29
-8
lines changed

7 files changed

+29
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ All notable changes to the [Nucleus Python Client](https://github.com/scaleapi/n
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.14.21](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.21) - 2022-09-28
9+
10+
### Added
11+
- Support for `context_attachment` metadata values. See [upload metadata](https://nucleus.scale.com/docs/upload-metadata) for more information.
12+
813
## [0.14.20](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.20) - 2022-09-23
914

1015
### Fixed
1116
- Local uploads are correctly batched and prevents flooding the network with requests
1217

13-
1418
## [0.14.19](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.19) - 2022-08-26
1519

1620
### Added

nucleus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def create_dataset(
416416
417417
{
418418
"field_name": {
419-
"type": "category" | "number" | "text"
419+
"type": "category" | "number" | "text" | "json"
420420
"choices": List[str] | None
421421
"description": str | None
422422
},

nucleus/annotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class BoxAnnotation(Annotation): # pylint: disable=R0902
134134
our `metadata guide <https://nucleus.scale.com/docs/upload-metadata>`_.
135135
136136
Coordinate metadata may be provided to enable the Map Chart in the Nucleus Dataset charts page.
137-
These values can be specified as `{"lat": 52.5, "lon": 13.3, ... }`.
137+
These values can be specified as `{ "lat": 52.5, "lon": 13.3, ... }`.
138138
139139
embedding_vector: Custom embedding vector for this object annotation.
140140
If any custom object embeddings have been uploaded previously to this dataset,

nucleus/dataset_item.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ class DatasetItem: # pylint: disable=R0902
8787
info.
8888
8989
Coordinate metadata may be provided to enable the Map Chart in the Nucleus Dataset charts page.
90-
These values can be specified as `{"lat": 52.5, "lon": 13.3, ... }`.
90+
These values can be specified as `{ "lat": 52.5, "lon": 13.3, ... }`.
91+
92+
Context Attachments may be provided to display the attachments side by side with the dataset
93+
item in the Detail View by specifying
94+
`{ "context_attachments": [ { "attachment": 'https://example.com/1' }, { "attachment": 'https://example.com/2' }, ... ] }`.
9195
9296
.. todo ::
9397
Shorten this once we have a guide migrated for metadata, or maybe link

nucleus/prediction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class BoxPrediction(BoxAnnotation):
160160
our `metadata guide <https://nucleus.scale.com/docs/upload-metadata>`_.
161161
162162
Coordinate metadata may be provided to enable the Map Chart in the Nucleus Dataset charts page.
163-
These values can be specified as `{"lat": 52.5, "lon": 13.3, ... }`.
163+
These values can be specified as `{ "lat": 52.5, "lon": 13.3, ... }`.
164164
165165
class_pdf: An optional complete class probability distribution on this
166166
annotation. Each value should be between 0 and 1 (inclusive), and sum up to

nucleus/scene.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,13 @@ class LidarScene(Scene):
383383
added to it, but must be non-empty when uploading to a :class:`Dataset`.
384384
metadata (Optional[Dict]):
385385
Optional metadata to include with the scene.
386+
386387
Coordinate metadata may be provided to enable the Map Chart in the Nucleus Dataset charts page.
387-
These values can be specified as `{"lat": 52.5, "lon": 13.3, ... }`.
388+
These values can be specified as `{ "lat": 52.5, "lon": 13.3, ... }`.
389+
390+
Context Attachments may be provided to display the attachments side by side with the dataset
391+
item in the Detail View by specifying
392+
`{ "context_attachments": [ { "attachment": 'https://example.com/1' }, { "attachment": 'https://example.com/2' }, ... ] }`.
388393
389394
Refer to our `guide to uploading 3D data
390395
<https://docs.nucleus.scale.com/docs/uploading-3d-data>`_ for more info!
@@ -455,7 +460,15 @@ class VideoScene(ABC):
455460
List of items representing frames, to be a part of the scene. A scene can be created
456461
before items have been added to it, but must be non-empty when uploading to
457462
a :class:`Dataset`. A video scene can contain a maximum of 3000 items.
458-
metadata (Optional[Dict]): Optional metadata to include with the scene.
463+
metadata (Optional[Dict]):
464+
Optional metadata to include with the scene.
465+
466+
Coordinate metadata may be provided to enable the Map Chart in the Nucleus Dataset charts page.
467+
These values can be specified as `{ "lat": 52.5, "lon": 13.3, ... }`.
468+
469+
Context Attachments may be provided to display the attachments side by side with the dataset
470+
item in the Detail View by specifying
471+
`{ "context_attachments": [ { "attachment": 'https://example.com/1' }, { "attachment": 'https://example.com/2' }, ... ] }`.
459472
upload_to_scale (Optional[bool]): Set this to false in order to use
460473
`privacy mode <https://nucleus.scale.com/docs/privacy-mode>`_. If using privacy mode
461474
you must upload both a video_location and items to the VideoScene.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exclude = '''
2121

2222
[tool.poetry]
2323
name = "scale-nucleus"
24-
version = "0.14.20"
24+
version = "0.14.21"
2525
description = "The official Python client library for Nucleus, the Data Platform for AI"
2626
license = "MIT"
2727
authors = ["Scale AI Nucleus Team <nucleusapi@scaleapi.com>"]

0 commit comments

Comments
 (0)