Skip to content

Commit 4d0c295

Browse files
authored
Update version with changes to dataset.scene_and_annotation_generator() (#442)
* optional slice param * up versioning and rename param name for consistency * forgot to update date
1 parent b1216ce commit 4d0c295

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ 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.17.7](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.17.7) - 2024-11-05
9+
10+
### Added
11+
- Adding `slice_id` parameter for `dataset.scene_and_annotation_generator()`.
12+
13+
Example usage:
14+
15+
```python
16+
dataset = client.get_dataset("ds_...")
17+
for scene in dataset.scene_and_annotation_generator(slice_id="slc_..."):
18+
#...
19+
```
20+
821
## [0.17.6](https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.17.6) - 2024-07-03
922

1023
### Added

nucleus/dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,12 +1450,12 @@ def items_and_annotations(
14501450
return convert_export_payload(api_payload[EXPORTED_ROWS])
14511451

14521452
def scene_and_annotation_generator(
1453-
self, sliceId=None, page_size: int = 10
1453+
self, slice_id=None, page_size: int = 10
14541454
):
14551455
"""Provides a generator of all Scenes and Annotations in the dataset grouped by scene.
14561456
14571457
Args:
1458-
sliceId: Optional slice ID to filter the scenes and annotations.
1458+
slice_id: Optional slice ID to filter the scenes and annotations.
14591459
page_size: Number of scenes to fetch per page. Default is 10.
14601460
14611461
Returns:
@@ -1508,7 +1508,7 @@ def scene_and_annotation_generator(
15081508
endpoint=f"dataset/{self.id}/{endpoint_name}",
15091509
result_key=EXPORT_FOR_TRAINING_KEY,
15101510
page_size=page_size,
1511-
sliceId=sliceId,
1511+
sliceId=slice_id,
15121512
)
15131513

15141514
for data in json_generator:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ignore = ["E501", "E741", "E731", "F401"] # Easy ignore for getting it running
2525

2626
[tool.poetry]
2727
name = "scale-nucleus"
28-
version = "0.17.6"
28+
version = "0.17.7"
2929
description = "The official Python client library for Nucleus, the Data Platform for AI"
3030
license = "MIT"
3131
authors = ["Scale AI Nucleus Team <nucleusapi@scaleapi.com>"]

0 commit comments

Comments
 (0)