File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ All notable changes to the [Nucleus Python Client](https://github.com/scaleapi/n
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+
9
+ ## [ 0.14.28] ( https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.28 ) - 2022-11-17
10
+
11
+ ### Added
12
+ - Support for appending to slice with Scene reference IDs
13
+ - Better error handling when appending to a slice with non-existent reference IDs
14
+
15
+
8
16
## [ 0.14.27] ( https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.27 ) - 2022-11-04
9
17
10
18
### Added
Original file line number Diff line number Diff line change @@ -869,22 +869,25 @@ def append_to_slice(
869
869
self ,
870
870
slice_id : str ,
871
871
reference_ids : List [str ],
872
+ dataset_id : str ,
872
873
) -> dict :
873
874
# TODO: migrate to Slice method and deprecate
874
- """Appends dataset items to an existing slice.
875
+ """Appends dataset items or scenes to an existing slice.
875
876
876
877
Parameters:
877
878
slice_id: Nucleus-generated dataset ID (starts with ``slc_``). This can
878
879
be retrieved via :meth:`Dataset.slices` or a Nucleus dashboard URL.
879
- reference_ids: List of user-defined reference IDs of the dataset items
880
+ reference_ids: List of user-defined reference IDs of dataset items or scenes
880
881
to append to the slice.
882
+ dataset_id: ID of dataset this slice belongs to.
881
883
882
884
Returns:
883
885
Empty payload response.
884
886
"""
885
887
886
888
response = self .make_request (
887
- {REFERENCE_IDS_KEY : reference_ids }, f"slice/{ slice_id } /append"
889
+ {REFERENCE_IDS_KEY : reference_ids , DATASET_ID_KEY : dataset_id },
890
+ f"slice/{ slice_id } /append" ,
888
891
)
889
892
return response
890
893
Original file line number Diff line number Diff line change @@ -319,11 +319,11 @@ def append(
319
319
at upload time.
320
320
321
321
Parameters:
322
- reference_ids: A list of user-specified IDs for DatasetItems you wish
323
- to append.
322
+ reference_ids: List of user-defined reference IDs of dataset items or scenes
323
+ to append to the slice .
324
324
325
325
Returns:
326
- Dict of the slice_id and the newly appended DatasetItem IDs. ::
326
+ Dict of the slice_id and the newly appended IDs. ::
327
327
328
328
{
329
329
"slice_id": str,
@@ -333,6 +333,7 @@ def append(
333
333
response = self ._client .append_to_slice (
334
334
slice_id = self .id ,
335
335
reference_ids = reference_ids ,
336
+ dataset_id = self .dataset_id ,
336
337
)
337
338
return response
338
339
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ exclude = '''
21
21
22
22
[tool .poetry ]
23
23
name = " scale-nucleus"
24
- version = " 0.14.27 "
24
+ version = " 0.14.28 "
25
25
description = " The official Python client library for Nucleus, the Data Platform for AI"
26
26
license = " MIT"
27
27
authors = [" Scale AI Nucleus Team <nucleusapi@scaleapi.com>" ]
You can’t perform that action at this time.
0 commit comments