Skip to content

Commit b52db13

Browse files
authored
changelog (#385)
1 parent b33679b commit b52db13

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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.15.6](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.15.6) - 2023-06-03
9+
10+
### Changed
11+
- Document new restrictions to slice create/append.
12+
- `Dataset.create_slice` and `Slice.append` methods cannot exceed 10,000 items per request.
13+
814
## [0.15.5](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.15.5) - 2023-05-8
915

1016
### Fixed

nucleus/dataset.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,13 @@ def create_slice(
887887
888888
Parameters:
889889
name: A human-readable name for the slice.
890-
reference_ids: List of reference IDs of dataset items to add to the slice::
890+
reference_ids: List of reference IDs of dataset items to add to the slice, cannot exceed 10,000 items.
891891
892892
Returns:
893893
:class:`Slice`: The newly constructed slice item.
894+
895+
Raises:
896+
BadRequest: If length of reference_ids is too large (> 10,000 items)
894897
"""
895898
payload = {NAME_KEY: name, REFERENCE_IDS_KEY: reference_ids}
896899
response = self._client.make_request(

nucleus/slice.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def append(
340340
"""Appends existing DatasetItems from a Dataset to a Slice.
341341
342342
The endpoint expects a list of DatasetItem reference IDs which are set
343-
at upload time.
343+
at upload time. The length of reference_ids cannot exceed 10,000 items per request.
344344
345345
Parameters:
346346
reference_ids: List of user-defined reference IDs of dataset items or scenes
@@ -353,6 +353,9 @@ def append(
353353
"slice_id": str,
354354
"new_items": List[str]
355355
}
356+
357+
Raises:
358+
BadRequest: If length of reference_ids is too large (> 10,000 items)
356359
"""
357360
response = self._client.append_to_slice(
358361
slice_id=self.id,

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.15.5"
24+
version = "0.15.6"
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)