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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# Important: Don't change this otherwise we will stop testing the earliest
# python version we have to support.
- image: python:3.6-buster
resource_class: small
resource_class: medium
parallelism: 6
steps:
- checkout # checkout source code to working directory
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ All notable changes to the [Nucleus Python Client](https://github.com/scaleapi/n
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.14.11](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.12) - 2022-08-05
## [0.14.13](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.13) - 2022-08-10

### Fixed
- Fix payload parsing for scene export

## [0.14.12](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.12) - 2022-08-05

### Added
- Added auto-paginated `Slice.export_predictions_generator`

### Fixed
- Change `{Dataset,Slice}.items_and_annotation_generator` to work with improved paginate endpoint

Expand Down
12 changes: 11 additions & 1 deletion nucleus/dataset_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,21 @@ def from_json(cls, payload: dict):
image_url = payload.get(IMAGE_URL_KEY, None) or payload.get(
ORIGINAL_IMAGE_URL_KEY, None
)
pointcloud_url = payload.get(POINTCLOUD_URL_KEY, None)

# handle case when re-converting Scene.from_json
url = payload.get(URL_KEY, None)
if url and not image_url and not pointcloud_url:
if url.split(".")[-1] in ("jpg", "png"):
image_url = url
elif url.split(".")[-1] in ("json",):
pointcloud_url = url

if BACKEND_REFERENCE_ID_KEY in payload:
payload[REFERENCE_ID_KEY] = payload[BACKEND_REFERENCE_ID_KEY]
return cls(
image_location=image_url,
pointcloud_location=payload.get(POINTCLOUD_URL_KEY, None),
pointcloud_location=pointcloud_url,
reference_id=payload.get(REFERENCE_ID_KEY, None),
metadata=payload.get(METADATA_KEY, {}),
upload_to_scale=payload.get(UPLOAD_TO_SCALE_KEY, True),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exclude = '''

[tool.poetry]
name = "scale-nucleus"
version = "0.14.12"
version = "0.14.13"
description = "The official Python client library for Nucleus, the Data Platform for AI"
license = "MIT"
authors = ["Scale AI Nucleus Team <nucleusapi@scaleapi.com>"]
Expand Down